Hi all...
I am in a big dilemma and i would need some of your suggestions.
I have an app where one of the menu items will have dynamically generated sub-menu items (collected from an array, etc.).
I figured how to make a control array in the menu editor, and I just set the captions and make those sub-menus visible or not.
example:
For i = 0 To x
mnuTest.Item(i).Caption = arrTempTrOpt(i)
mnuTest(i).Visible = True
Next
Where mnuTest(i) is my menu control array built with the Menu Editor.
arrTempTrOpt(i) is the array for the manu captions.
The problem comes if I want to add a sub-menu to those dynamically generated sub-menus.
Here is a diagram to explain myself:
Tools(main menu item on the menu-bar)
|
|_Submenu 01
| |_Item A
| |_Item B
| |_Item C
|
|_Submenu 02
| |_Item A
| |_Item B
| |_Item C
|
|_Submenu 03
|_Item A
|_Item B
|_Item C
1. As you see, "Submenu 01 - Submenu 03" are my dynamically generated submenu items. Their caption is set whith whatever value I am getting from my array (those values are coming from a server in a delimited string)
2. The sub-menus (Item A-Item C) of the "Submenu 01 - Submenu 03" have the same captions for all 3 submenus same order, etc. The only thing is they will point to different subs.
So I don't know what's the best strategy for this, where to start, etc.
Examples are MORE than welcome!
Thanks a lot,
Gabi.
I am in a big dilemma and i would need some of your suggestions.
I have an app where one of the menu items will have dynamically generated sub-menu items (collected from an array, etc.).
I figured how to make a control array in the menu editor, and I just set the captions and make those sub-menus visible or not.
example:
For i = 0 To x
mnuTest.Item(i).Caption = arrTempTrOpt(i)
mnuTest(i).Visible = True
Next
Where mnuTest(i) is my menu control array built with the Menu Editor.
arrTempTrOpt(i) is the array for the manu captions.
The problem comes if I want to add a sub-menu to those dynamically generated sub-menus.
Here is a diagram to explain myself:
Tools(main menu item on the menu-bar)
|
|_Submenu 01
| |_Item A
| |_Item B
| |_Item C
|
|_Submenu 02
| |_Item A
| |_Item B
| |_Item C
|
|_Submenu 03
|_Item A
|_Item B
|_Item C
1. As you see, "Submenu 01 - Submenu 03" are my dynamically generated submenu items. Their caption is set whith whatever value I am getting from my array (those values are coming from a server in a delimited string)
2. The sub-menus (Item A-Item C) of the "Submenu 01 - Submenu 03" have the same captions for all 3 submenus same order, etc. The only thing is they will point to different subs.
So I don't know what's the best strategy for this, where to start, etc.
Examples are MORE than welcome!
Thanks a lot,
Gabi.