General information
Category:
Coding, syntax & commands
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
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only