On Nov 30, 2006, at 7:48 PM, Charles Yeomans wrote:
OK, so, wonderful, so how do you set up an Event that has code?
Write a MenuItem subclass in which you implement the Action and
EnableMenu event handlers.
But you don't HAVE to subclass to use dynamic MenuItems created in
code...
1) New Project
2) To the Default window open event add:
Sub Open()
Dim MI as New MenuItem
MI.Name = "Test"
MI.Text = "test"
MI.AutoEnable = True
EditMenu.Append MI
End Sub
3) Then add a MenuHandler to the default window just using the
MenuItem name:
Function Test() As Boolean
MsgBox "called"
Return True
End Function
4) Run the project and Select "test" from the EditMenu... The MsgBox
appears
- Karen
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>