Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Navigation Buttons in Container
Message
De
12/12/2006 14:14:48
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
12/12/2006 13:49:37
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 6
OS:
Windows 2000 SP4
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01176887
Message ID:
01176958
Vues:
16
>Hi Terry,
>
>Your recommendation sounds great and I understand it. However, I am very new at VFP programming and I would not know how to go about this. I just re-arranged the buttons already the way I wanted it in my container and used that. If I need this again then I guess I will re-create the same buttons with different positions.

You can have some code in the container's init, which would just go through the .buttons[] array and calculate the position of each button. You can set any object's .top, .left etc at runtime, they don't need to be set in advance.

Something like
lnLeft=0
for i=1 to this.buttoncount
   with this.buttons[i]
      if .visible
         .left=lnLeft
         .top=0
         lnLeft=lnLeft+.width+1   && one pixel gap, if you like
      endif
   endwith
endfor
This would align visible buttons in one line. You could add similar code for the two row case (lnTop would be there, zero for 1st row, .height+1 for 2nd). You could have a property on the container which would indicate in how many rows does it go, then consult this property before running this code (in container's init). You'd only have to set that property for the container in those forms where it should have a non-default value.

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