Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dynamc Menus & SubMenus
Message
 
To
06/01/2003 12:54:26
General information
Forum:
Visual Basic
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00735460
Message ID:
00738438
Views:
16
I don't where your going and what you are trying to do but it seems to me that you will have to build your own menu control.

See if this one could help: http://www.datadynamics.com/activebar/default.htm


>The problem with building the menu at design time is that the end user-administrator needs to be able to define the menu items.
>
>So here is my brilliant idea (maybe not since I haven't gotten it working yet)... I can use the vbAccelerator popup menu for the submenus and create the menu bar as an index so I can dynamically create the parent menu. I know that the top will always be = 0 for the popup menu so now all I need to figure out is the left. I know that the first popup menu left will always = 0. I was thinking that there should be some formula that can dtermine the left from the caption length of the menu bar to get the popup menu close to where it should be. ie
>
>Example of menu bar called mnuInit with index of 0, I set the tag to whatever I have named each popup menu:
>
>File Administrator Borrower
>
>?? = 76
>
>click on File the left = 0 top = 0 for popup
>click on Administrator left = (len(mnuInit(0).caption) * ??) = 304: top = 0
>click on Borrower left = (len(mnuInit(0).caption) + len(mnuInit(1).caption) * ??) = 1292: top = 0
>
>Does this make sense? How would I figure out what the the number ?? should be? To figure it out I've been debug.print the x, y of the form mousedown event and then dividing the x by the len of the caption.
>
>Am I totally going down the wrong path?
>
>Thanks Nichole
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Previous
Reply
Map
View

Click here to load this message in the networking platform