473,569 Members | 2,572 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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(intContado r)
If intContador = 3 Then mnuItem.Enabled = False
mnuPrincipal.Me nuItems.Add(mnu Item)
AddHandler mnuItem.Click, AddressOf Me.mnuPrincipal _Click

For intContador2 = 0 To 5

Dim mnuSubItem As New clsMenuItem
mnuSubItem.Text = Cstr(intContado r)
'// PROBLEM------
mnuPrincipal.Me nuItems(intCont ador).MenuItems .Add(mnuSubItem )
'// PROBLEM------
AddHandler mnuSubItem.Clic k, 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).Me nuItems(Z).Menu Items.Add(mnuSu bItem) dynamic ?

TIA
Nov 20 '05 #1
0 937

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

Similar topics

5
3377
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 Category and Subcategory and query off of those fields. I have a client now who is interested in what sounds to me to be an unnecessarily complex...
4
5182
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 the menu content in the same part of the page where the menu goes (BODY). The content of the page is generated dynamically so I can't put the menu...
1
17648
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 Create a Dynamic Crosstab Report PRODUCT :Microsoft Access PROD/VER:1.00 1.10 OPER/SYS:WINDOWS
2
1752
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 due to client requirement i have to avoid using frames and hence menu and the page will be a single page. So is there is any way by which the left...
19
258971
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. For example, the first menu has three cities London, Paris, New York. If I choose London it populates the second menu with people from London. ...
0
923
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 "MaximumDynamicDisplayLevels" but it dosn't seem to apply and it tried turning it up but it didn't affect anything.
3
3213
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 want both the top- and sublevel to be horizontal in orientation. Kind of like the menu structure on (eek!) www.apple.com. J.Jespersen
3
4772
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 dynamically generated, and the dynamic generation needs to occur right when the user selects this menu item (that is on the Popup event handler). However,...
10
57025
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 what is shown in the dynamic menu. For example, the first menu has three cities London, Paris, New York. If I choose London it populates the second...
0
7700
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7614
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7924
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8125
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7676
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6284
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5219
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3642
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2114
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.