Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Add selections programmatically
Message
 
 
To
27/02/2008 15:30:48
General information
Forum:
Visual FoxPro
Category:
Menus & Menu designer
Miscellaneous
Thread ID:
01296923
Message ID:
01297239
Views:
17
>>>Suppose you have an applications main menu tree defined as:
>>>
>>>File
>>>  Choice 1
>>>  Choice 2
>>>
>>>Surveys
>>>  Choice 1
>>>  Choice 2
>>>  Print
>>>    Choice 1
>>>    Choice 2
>>>    Special Report
>>>
>>>Other Items
>>>
>>>Can someone clarify for me what is a menu bar, what is a menu pad, and what is a menu popup?
>>
>>A menu is a list of selectable items. Now some smartass somewhere decided that it has to have one set of names for the case when this list is horizontal and a completely different one when it's vertical, although the logic is just the same.
>>So, if it's horizontal it's called a menu and has pads. If it's vertical it's a popup (or popup menu) and has bars. A menu pad can do something or open a popup; a popup bar can do something or open another popup (thus cascading to any depth until you get something like Word 2.0), but it can't open a menu (did you ever see a horizontal list spread out of a vertical? neither have I).
>>
>>VFP (and FP for that matter) complies to this nonsense to the end. There's a separate set of functions for the horizontal and for the vertical.
>>
>>>Secondly, if we wanted to further subdivide Special Report programmatically based on values in a table, would the code belong in the setup code or the cleanup code? I am guessing the setup code but is that correct? And finally, what would be the code commands to add these additional selections? I have done this in a previous application but I had to build the entire tree from Surveys on down. Is it possible to start with the tree already defined and just add to it?
>>
>>Check Define Bar and On Selection Bar - you can add more bars to an existing popup.
>
>Thanks Dragan.
>So just to make certain I am clear on the definitions, the selections that appear across the top when the menu is not in use are called PADS. Beneath those, the selections that open up other selections (the betweeners) are called popups, and the last selections in the tree are called bars. Would that be correct?
>
>In my example File, Surveys, and Other Items are pads.
>File/Choice1 and File/Choice2 are popups.
>Surveys/Choice 1 and Surveys/Choice 2 are popups.
>Surveys/Print is a popup.
>Everything below Surveys/Print is a bar because they actually execute command or procedure code.
>Would that be correct?
>
>And would you put the additional code (to add more bars) in setup or cleanup, or doesn't it matter?

There was a FoxTalk article by Andy Kramek & Marcia Akins about generating menu from the table long time ago (it's either March or February 2001 if my memory serves (or even before that)).

We also did something like this in our application, though it was more complex...
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform