Page 1 of 1
PAGINAS EN UN TAB
Posted: Thu Dec 16, 2021 7:22 pm
by SALINETAS24
Hola a todos.
¿Es posible saber el numero de Página que contiene un TAB ..?
Agradecido de antemano.., vamos con una cervecita bien fresquita.

Re: PAGINAS EN UN TAB
Posted: Fri Dec 17, 2021 8:56 pm
by Red2
Hi,
If I understand your question the following returns the tab number for me:
lnTabNbr := GetProperty( "DataForm", "pgf_ItemsStates", "Value" )
I place it in the PageFrame's (Tab) control's OnChange() event.
Hope that this is helpful,
Red2
Re: PAGINAS EN UN TAB
Posted: Fri Dec 17, 2021 9:26 pm
by SALINETAS24
Red2 wrote: ↑Fri Dec 17, 2021 8:56 pm
Hi,
If I understand your question the following returns the tab number for me:
lnTabNbr := GetProperty( "DataForm", "pgf_ItemsStates", "Value" )
I place it in the PageFrame's (Tab) control's OnChange() event.
Hope that this is helpful,
Red2
Hola Red2, gracias por contestar.
Efectivamente, con lo que tu dices obtengo el numero de Page activo en el TAB, pero yo lo que me gustaria saber ¿cuantas pages tiene el TAB..? 1., 2.., 3.., ??
He conseguido esto
msgdebug(_hmg_sysdata[141]) // --> {"Page_1","Page_2","Page_3}
por lo tanto
LEN((_hmg_sysdata[141]) = 3 // --> Numero de paginas total.
El problema es que solo funciona si tengo 1 solo TAB.
No controlo suficientemente la estructura de _Hmg_sysData
Agradecido y vamos con una cervecita bien fresquita..!!
Re: PAGINAS EN UN TAB
Posted: Fri Dec 17, 2021 9:41 pm
by danielmaximiliano
Hola Salinetas : creo que el tab tiene Itemcount que es la cantidad de PAGE en un TAB
Re: PAGINAS EN UN TAB
Posted: Fri Dec 17, 2021 10:03 pm
by SALINETAS24
Hola a todos... ya esta resuelto.
Code: Select all
STATIC PROC f_change(ParentForm, ControlName)
LOCAL n_value := form_1.tab_1.value
LOCAL ControlHandle
LOCAL nTab:=0
LOCAL Images, NoTrans := .T.
LOCAL nlen
LOCAL aImagen:={}
IF n_value=4
Form_1.Grid_1.Setfocus
ENDIF
DOMETHOD(ParentForm, Controlname, "SETFOCUS")
i := GetControlIndex ( Controlname , ParentForm )
nLen:=len(_hmg_sysdata[33][i]) // --> Aqui tengo el numero de paginas activas
nTab := GetProperty(ParentForm ,ControlName, "Value")
FOR n=1 to nLen
AADD(aImagen,"check.bmp")
NEXT
aImagen[nTab]:="exit.bmp"
ControlHandle := GetControlHandle( ControlName, ParentForm )
// not sure need to Destroy "old" Imagelist before
IMAGELIST_DESTROY(ControlHandle)
// will create own Imagelist and set TCM_SETIMAGELIST
ADDTABBITMAP( ControlHandle, aImagen, NoTrans )
RETURN
Y ahora os paso el programa para que veais el efecto. Las funciones de cambio las encontre en el Foro y las aporto AUGE.
Salud y vamos con una cervecita fresquita.