Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ZOrder Woes
Message
De
11/05/2007 10:46:47
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
01224223
Message ID:
01224641
Vues:
13
>ZOrder is changing the order of the controls in the .Controls property.
>
>I have the following code that repositions tabs in a tabset:
>
>
>nLeft = 0
>FOR nControl = 1 TO .ControlCount
>
>	oControl = .Controls[nControl]
>
>	IF LOWER(oControl.Class) = "mytab"
>
>		oControl.Left = nLeft
>		
>		IF nControl > 1
>			oControl.Left = oControl.Left - 7
>		ENDIF			
>	
>		nLeft = oControl.Left + oControl.Width
>	
>	ENDIF
>
>ENDFOR
>
>
>The problem is that when a tab is clicked, I use ZOrder(0) to bring the tab in front of
>all others.
>
>Since ZOrder is changing the order of the controls in the .Controls property, the above code
>no longer works.
>
>I'm open to suggestions on this.

You can store references to your tabs into an array, and sort the array by page order. Then use this array instead of .controls array. Then their zOrder wouldn't matter.

Take care to release these references on time (pageframe.destroy, perhaps) so they don't keep dangling around.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform