|
-
Jan 11th, 2002, 05:40 PM
#1
Thread Starter
Junior Member
Top Level & Sub Level Menus at runtime
Doe's any one know how to create menu Items at run-time.
E.G I'd like to create a Friends Top Level Menu Item. Under that I want Bob as an Item, Fred as an Item, Taylor Family as an Item, but be able to Sub Level the Taylor Family so I can put in Tim and Jill in as a sub Level of Taylor Family.
Any Ideas?
-
Jan 11th, 2002, 05:48 PM
#2
Stuck in the 80s
You can do so using indexed menus. Create one menu item and give it an index of zero, then use:
VB Code:
Private Sub Command1_Click()
Load mnuOpen(mnuOpen.UBound + 1)
With mnuOpen(mnuOpen.UBound)
.Caption = "Open #" & mnuOpen.UBound
.Visible = True
End With
End Sub
-
Jan 11th, 2002, 05:50 PM
#3
If it doesn't HAVE to be a menu then I would use a treeview control. Otherwise you just indent or if you mean at run time then use different index patterns.
-
Jan 11th, 2002, 06:12 PM
#4
Thread Starter
Junior Member
The code seems to only add a TOP Level Menu Item, How do I do the indent for the sub levels??
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|