Page 1 of 1
Consulta por TAB control
Posted: Fri Aug 21, 2009 2:20 pm
by claudiotedesco
Tengo armado un Tab Control con 4 solapas y quisiera que cuando se presiona un boton determinado se oculten 2 de las 4 solapas.
Eso es posible? si no es asi por lo menos desactivar las 2 solapas momentaneamente.
Gracias
Claudio
I have assembled a Tab Control with 4 flaps and would like when you press button is hide 2 of the 4 flaps. That's possible? If it is not at least momentarily off the 2 flaps.
Thanks
Re: Consulta por TAB control
Posted: Fri Aug 21, 2009 5:06 pm
by Roberto Lopez
claudiotedesco wrote:Tengo armado un Tab Control con 4 solapas y quisiera que cuando se presiona un boton determinado se oculten 2 de las 4 solapas.
Eso es posible? si no es asi por lo menos desactivar las 2 solapas momentaneamente.
Gracias
Claudio
I have assembled a Tab Control with 4 flaps and would like when you press button is hide 2 of the 4 flaps. That's possible? If it is not at least momentarily off the 2 flaps.
Thanks
That is not implemented yet, but something like this could be useful.
The following sample, disables page 3:
Code: Select all
/*
* MINIGUI - Harbour Win32 GUI library Demo
*
* Copyright 2008 Roberto Lopez <harbourminigui@gmail.com>
* http://harbourminigui.googlepages.com/
*/
#include "minigui.ch"
Function Main
Local aRows [20] [3]
Public nTabValue := 1
aRows [1] := {'Simpson','Homer','555-5555'}
aRows [2] := {'Mulder','Fox','324-6432'}
aRows [3] := {'Smart','Max','432-5892'}
aRows [4] := {'Grillo','Pepe','894-2332'}
aRows [5] := {'Kirk','James','346-9873'}
DEFINE WINDOW Form_1 ;
AT 0,0 ;
WIDTH 640 HEIGHT 480 ;
TITLE 'Harbour MiniGUI Demo' ;
MAIN
DEFINE MAIN MENU
DEFINE POPUP 'Test'
MENUITEM 'Get Button Caption' ACTION MsgInfo ( Form_1.Tab_1(1).Button_1.Caption )
MENUITEM 'Set Button Caption' ACTION Form_1.Tab_1(1).Button_1.Caption := 'New'
SEPARATOR
MENUITEM 'Get Grid Header' ACTION MsgInfo ( Form_1.Tab_1(4).Grid_1.Header(1) )
MENUITEM 'Set Grid Header' ACTION Form_1.Tab_1(4).Grid_1.Header(1) := 'New'
SEPARATOR
MENUITEM 'Set Grid Cell' ACTION Form_1.Tab_1(4).Grid_1.Cell(1,1) := 'New'
MENUITEM 'Get Grid Cell' ACTION MsgInfo ( Form_1.Tab_1(4).Grid_1.Cell(1,1) )
SEPARATOR
MENUITEM 'Show Button' ACTION Form_1.Tab_1(1).Button_1.Show()
MENUITEM 'Hide Button' ACTION Form_1.Tab_1(1).Button_1.Hide()
END POPUP
END MENU
DEFINE TAB Tab_1 ;
AT 10,10 ;
WIDTH 600 ;
HEIGHT 400 ;
VALUE 1 ;
TOOLTIP 'Tab Control';
ON CHANGE Test()
PAGE 'Page 1'
@ 100,250 BUTTON Button_1 CAPTION "Test" WIDTH 50 HEIGHT 50 ACTION MsgInfo('Test!')
END PAGE
PAGE 'Page &2'
DEFINE RADIOGROUP R1
ROW 100
COL 100
OPTIONS { '1','2','3' }
VALUE 1
END RADIOGROUP
END PAGE
PAGE 'Page 3'
@ 100,250 SPINNER Spinner_1 ;
RANGE 0,10 ;
VALUE 5 ;
WIDTH 100 ;
TOOLTIP 'Range 0,10' ;
ON CHANGE PlayBeep()
END PAGE
PAGE 'Page 4'
@ 50,50 GRID Grid_1 ;
WIDTH 200 ;
HEIGHT 330 ;
HEADERS {'Last Name','First Name','Phone'} ;
WIDTHS {140,140,140};
ITEMS aRows ;
VALUE 1
END PAGE
END TAB
END WINDOW
Form_1.Center
Form_1.Activate
Return Nil
procedure Test
If This.Value == 3
This.value := nTabValue
EndIf
nTabValue := This.Value
Return
Re: Consulta por TAB control
Posted: Mon Aug 24, 2009 12:54 pm
by claudiotedesco
Hola Roberto
Te agradezco por tu ayuda.
Lo voy a implementar.
Gracias
Claudio