Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
PageFrame Height
Message
De
19/03/2008 21:04:08
 
 
À
19/03/2008 18:01:25
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Divers
Thread ID:
01303410
Message ID:
01303724
Vues:
18
Way cool. I will check on it in the morning.

>>Thanks, I will keep eye on it, and look forward to seeing your replacement.
>
>This is from the file ctl32_functions.prg of the ctl32 classes download version 20080314 from www.ctl32.com.ar
>
>
>#Define TRUE				.T.
>#Define FALSE				.F.
>
>#Define CON_PEMSTAT_DEFINED		5
>
>#Define CON_TABOR_TOP			0
>#Define CON_TABOR_BOTTOM		1
>#Define CON_TABOR_LEFT			2
>#Define CON_TABOR_RIGHT			3
>
>
>********************************************************************************
>Function ctlObjToClient(m.poControl As Control, m.pcValueToReturn As String)
>********************************************************************************
>*!* pcValueToReturn can be: T, B, L, R for Top, Bottom, Left, Right
>*!* This replaces OBJTOCLIENT that has bugs with pageframes
>********************************************************************************
>
>	Local m.lnPosition As Integer
>
>	m.pcValueToReturn = Upper(m.pcValueToReturn)
>	m.lnPosition = 0
>
>	Do Case
>
>		Case m.pcValueToReturn $ "TB"
>*!* 20070711 Modified to account for toolbars
>			Do While Inlist(Upper(m.poControl.BaseClass), "FORM", "TOOLBAR") = FALSE
>				If Pemstatus(m.poControl, "Top", CON_PEMSTAT_DEFINED) Then
>					m.lnPosition = m.lnPosition + m.poControl.Top
>				Endif
>				If Upper(m.poControl.BaseClass) == "PAGE" Then
>					If m.poControl.Parent.TabOrientation = CON_TABOR_TOP Then	&& Top
>						m.lnPosition = m.lnPosition + ;
>							m.poControl.Parent.Height - ;
>							m.poControl.Parent.PageHeight - ;
>							m.poControl.Parent.BorderWidth * 2
>					Else
>						m.lnPosition = m.lnPosition + 1
>					Endif
>				Endif
>				m.poControl = m.poControl.Parent
>			Enddo
>
>			If m.pcValueToReturn == "B" Then
>				m.lnPosition = m.lnPosition + This.Height
>			Endif
>
>		Case m.pcValueToReturn $ "LR"
>*!* 20070711 Modified to account for toolbars
>			Do While Inlist(Upper(m.poControl.BaseClass), "FORM", "TOOLBAR") = FALSE
>				If Pemstatus(m.poControl, "Left", CON_PEMSTAT_DEFINED) Then
>					m.lnPosition = m.lnPosition + m.poControl.Left
>				Endif
>				If Upper(m.poControl.BaseClass) == "PAGE"
>					If m.poControl.Parent.TabOrientation = CON_TABOR_LEFT Then	&& Left
>						m.lnPosition = m.lnPosition + ;
>							m.poControl.Parent.Width - ;
>							m.poControl.Parent.PageWidth - ;
>							m.poControl.Parent.BorderWidth * 2
>					Else
>						m.lnPosition = m.lnPosition + 1
>					Endif
>				Endif
>				m.poControl = m.poControl.Parent
>			Enddo
>
>			If m.pcValueToReturn == "R" Then
>				m.lnPosition = m.lnPosition + This.Width
>			Endif
>
>	Endcase
>
>	Return m.lnPosition
>Endfunc
>
>
>Carlos
Greg Reichert
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform