PAGINAS EN UN TAB

HMG en Español

Moderator: Rathinagiri

Post Reply
User avatar
SALINETAS24
Posts: 667
Joined: Tue Feb 27, 2018 3:06 am
DBs Used: DBF
Contact:

PAGINAS EN UN TAB

Post 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. ;)
Como dijo el gran pensador Hommer Simpson..., - En este mundo solo hay 3 tipos de personas, los que saben contar y los que no. :shock:
Red2
Posts: 281
Joined: Sat May 18, 2019 2:11 pm
DBs Used: Visual FoxPro, FoxPro
Location: United States of America

Re: PAGINAS EN UN TAB

Post 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
User avatar
SALINETAS24
Posts: 667
Joined: Tue Feb 27, 2018 3:06 am
DBs Used: DBF
Contact:

Re: PAGINAS EN UN TAB

Post 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..!!
Como dijo el gran pensador Hommer Simpson..., - En este mundo solo hay 3 tipos de personas, los que saben contar y los que no. :shock:
User avatar
danielmaximiliano
Posts: 2646
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Contact:

Re: PAGINAS EN UN TAB

Post by danielmaximiliano »

Hola Salinetas : creo que el tab tiene Itemcount que es la cantidad de PAGE en un TAB

Code: Select all

win1.Tab1.ItemCount
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
User avatar
SALINETAS24
Posts: 667
Joined: Tue Feb 27, 2018 3:06 am
DBs Used: DBF
Contact:

Re: PAGINAS EN UN TAB

Post 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.
Attachments
TAB.rar
cambio de color
(1.21 MiB) Downloaded 87 times
Como dijo el gran pensador Hommer Simpson..., - En este mundo solo hay 3 tipos de personas, los que saben contar y los que no. :shock:
Post Reply