Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Navigation Buttons in Container
Message
From
13/12/2006 12:19:47
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 6
OS:
Windows 2000 SP4
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01176887
Message ID:
01177249
Views:
19
>>>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.
>
>What .Buttons array? This is a container, not specifically a buttons container.


Ah, .objects then. The .buttons would apply to an optionbuttongroup or commandbuttongroup (or whatever they are called).

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform