J
jack
Hello,
I need to dynamically add menu items to an existing menu on an MDI form. In
the form load, when I create the menu items then add it to the menu control
using the Add method, the entire menu dissappears. Any one know why?
Below is the code I'm using to create the menu items and append them to the
existing menu:
Dim aDatasheets As ArrayList = gOSSystemFile.Datasheets
Dim oDatasheet As OSSystem.OSDatasheet
Dim mnuDatasheet As MenuItem
' existing top level menu item
mnuDatasheet = Me.mnuDatasheets
' add a submenu item for each datasheet in our set
For Each oDatasheet In aDatasheets
Dim mnuTemp As New MenuItem
mnuTemp.Text = oDatasheet.Name
mnuDatasheet.MenuItems.Add(mnuTemp)
Next
Thanks in advance.
Jack
I need to dynamically add menu items to an existing menu on an MDI form. In
the form load, when I create the menu items then add it to the menu control
using the Add method, the entire menu dissappears. Any one know why?
Below is the code I'm using to create the menu items and append them to the
existing menu:
Dim aDatasheets As ArrayList = gOSSystemFile.Datasheets
Dim oDatasheet As OSSystem.OSDatasheet
Dim mnuDatasheet As MenuItem
' existing top level menu item
mnuDatasheet = Me.mnuDatasheets
' add a submenu item for each datasheet in our set
For Each oDatasheet In aDatasheets
Dim mnuTemp As New MenuItem
mnuTemp.Text = oDatasheet.Name
mnuDatasheet.MenuItems.Add(mnuTemp)
Next
Thanks in advance.
Jack