|
-
Jul 29th, 2000, 05:14 AM
#1
Thread Starter
New Member
Simple question......
How do i add and remove menu items at run-time?
thanks
If practice makes perfect...
and nobody's perfect...
why the hell practice?
-
Jul 29th, 2000, 06:48 AM
#2
Lively Member
there is 1 way...
set the visibility of the menu to true or false
it is the easiest way...
YC Sim
Teenage Programmer
UIN 37903254
-
Jul 29th, 2000, 09:15 AM
#3
To add items at menu time:
Code:
'Code from Megatron:
Make a menu called mnuTest with a SubMenu called mnuSub.
Make sure that that Index property for it is set to 0.
Now insert this code into a CommandButton on the Form.
Private Sub Command1_Click()
' Add's another menu
Load mnuSub(mnuSub.Count)
End Sub
-
Jul 29th, 2000, 09:39 AM
#4
Thread Starter
New Member
If i have a menu called mnuMain, can i add and remove items from that menu at run-time?
If practice makes perfect...
and nobody's perfect...
why the hell practice?
-
Jul 29th, 2000, 09:50 AM
#5
Yes, but you must already have a SubMenu to add others. Make a SubMenu called mnuSub (Set the Index to 0) and put the following code into a CommandButton.
Code:
Private Sub Command1_Click()
i = mnuSub.Count
Load mnuSub(i)
mnuSub(i).Caption = "New Menu"
End Sub
-
Jul 29th, 2000, 09:56 AM
#6
Thread Starter
New Member
thanks
Thanks Megatron, im gettin there now.
How would i remove menu items, and set the click properties for each new menu item etc etc?
If practice makes perfect...
and nobody's perfect...
why the hell practice?
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
|