473,387 Members | 1,757 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

n levels dynamic menu

Hi,
I'm trying to make a dynamic menu loading menuitems from a db.

I managed to do this:

Dim mnuPrincipal As New MainMenu

For intContador = 0 To 5

Dim mnuItem As New clsMenuItem
mnuItem.Index = intContador
mnuItem.Text = Cstr(intContador)
If intContador = 3 Then mnuItem.Enabled = False
mnuPrincipal.MenuItems.Add(mnuItem)
AddHandler mnuItem.Click, AddressOf Me.mnuPrincipal_Click

For intContador2 = 0 To 5

Dim mnuSubItem As New clsMenuItem
mnuSubItem.Text = Cstr(intContador)
'// PROBLEM------
mnuPrincipal.MenuItems(intContador).MenuItems.Add( mnuSubItem)
'// PROBLEM------
AddHandler mnuSubItem.Click, AddressOf
Me.mnuPrincipal_Click

Next
Next
Me.Menu = mnuPrincipal

This work great, but I don't know how to 'automate' the line between '//
PROBLEM------, how can I make more
..MenuItems(X).MenuItems(Y).MenuItems(Z).MenuItems .Add(mnuSubItem) dynamic ?

TIA
Nov 20 '05 #1
0 922

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Travis Pupkin | last post by:
Hey, I've done a number of product catalogs/galleries with one or two category levels (Category > Subcategory). The straightforward way to do this, of course, is to use database fields for...
4
by: Stromboli | last post by:
hi people, My problem is that I need to build a dynamic menu (preferably that works in all the browsers) that appears when I mouseover a certain link. The problem is that I have to declare...
1
by: Nathan Bloomfield | last post by:
Does anyone know if there is any documentation which relates to Access2k + ? or can anyone help adjust the code? I am having trouble converting the DAO references. TITLE :INF: How to...
2
by: vikram | last post by:
I have to design a page which contains a dynamic generated menu at left side.Menu will be generated once a user log in and will remain as it is for the rest of the user session. Problem is that...
19
by: mart2006 | last post by:
I've created a dynamic drop down menu that populates itself with data from a MySQL table. What I would like to do is create a non dynamic drop down menu that alters what is shown in the dynamic menu....
0
by: Bishop | last post by:
I'm building a menu from the DB but when it displays, I can only drill down 3 levels. I don't get an error but the lower levels don't show up. Any ideas? I saw some references to...
3
by: Jeppe Jespersen | last post by:
Hi folks, I need to create a menu for a new website. Using a sitemapdatasource, i want to have two levels in my menu structure. Setting the orientation is simple enough for the top level, but I...
3
by: RahimAsif | last post by:
I am writing an application that requires the a portion of the main menu to be dynamic. The menu has file, panels, view files and help across the top. The view files sub menu needs to be...
10
by: mart2006 | last post by:
Hi, I'm fairly new to PHP and I've created a dynamic drop down menu that populates itself with data from a MySQL table. What I would like to do is create a non dynamic drop down menu that alters...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.