We help IT Professionals succeed at work.

Dynamic sub menu to existing static menu

qetuo088
qetuo088 asked
on
I have used vb's Menu Editor to create the following menu

Insert
  - link

and I have a file like the following :

[link]
template1
template2

As you can see I have a static menu. How do I use VB to read the above file and create the dynamic sub menu
under link, so I will have :

Insert
 - link
   - Template1
   - Template2

???
Comment
Watch Question

Head of Software Services
CERTIFIED EXPERT
Commented:
You create it with an Index of 0 (Zero)

Then you get effectively:

Insert
  - Link
    - Template(0)

You can then define the caption of Template(0) and Load additional items into the array:

Template(0).Caption = "Template 1"
Load Template(1)
Template(1).Caption = "Template 2"
Load Template(2)
Template(2).Caption = "Template 3"

And so on, the Template_Click event will then get an Index parameter to allow you to identify the particular element selected.
Ark
CERTIFIED EXPERT

Commented:
Take a look at http://www.domaindlx.com/e_morcillo/scripts/cod/default.asp?page=

Scroll down to
Using API-created menus without subclassing
>>This sample show how to obtain the info that VB stores with menus to create menus with API that does not requires subclasing.<<

or, direct link to sample: http://www.domaindlx.com/e_morcillo/download.asp?type=cod&file=grl_menus

Cheers

Explore More ContentExplore courses, solutions, and other research materials related to this topic.