473,396 Members | 1,866 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,396 software developers and data experts.

Menu item loop

I'm looking at a way to loop throught all menuitem object of a form,
including sub menu. From the form it self sub items doesn't matter
because i can access them directly without having to pass by parent
(i.e Open under File menu, i can call mnuOpen and don'y have to do
mnuFile.MnuOpen) ok you get the point.

I don't find any collection of these item. I have class that loop in
all form controls and check my Language XML file find the control and
check the text value for the current selected language. I manage to do
it for all controls and even special made controls. But i can't get
the menuitem to work. Form.Controls doesn't contain menuitem in there
so i guess there must be another way. I can make a special function
just for looping tru menuitem i have only 2-3 forms that need that
Aug 4 '08 #1
1 1794
On Mon, 04 Aug 2008 12:45:53 -0700, Franck <th***********@hotmail.com>
wrote:
I'm looking at a way to loop throught all menuitem object of a form,
including sub menu. From the form it self sub items doesn't matter
because i can access them directly without having to pass by parent
(i.e Open under File menu, i can call mnuOpen and don'y have to do
mnuFile.MnuOpen) ok you get the point.

I don't find any collection of these item. I have class that loop in
all form controls and check my Language XML file find the control and
check the text value for the current selected language. I manage to do
it for all controls and even special made controls. But i can't get
the menuitem to work. Form.Controls doesn't contain menuitem in there
so i guess there must be another way.
A ToolStripMenuItem is contained not by the Form instance, but instead by
a MenuStrip that is itself contained by the Form.

So you should first be searching for a MenuStrip, and then enumerating the
children of _that_.

Pete
Aug 4 '08 #2

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

Similar topics

3
by: Andrus Moor | last post by:
I want to use the keyboard keys for navigation in menu: 1. Alt+hotkey must activate menu bar 2. Left and right arrow must move between menus, 3. Up and Down arrow move between menu items. 4....
13
by: Matthew Hagston | last post by:
Trying to do some updating and beyond frustrations with making it compatibal with Mac's I am primarily done. Biggest problem I am having now is with Opera not displaying the menu. works fine in IE,...
2
by: Jackson Yap | last post by:
can someone kind enough to help me look at the attached html and js file? Why is it that the javascript menu could not work at www.apchosting.net but could work at...
2
by: Tim::.. | last post by:
Hi can someone please tell me how I dynamically create a menu like the one shown below from a database. I want to create a loop that loops through all the records in a table and builds a table...
1
by: Dave | last post by:
Hello, I'm working on a new site and i'd like to have a navigation menu on it. Ideally i'm thinking: home first item second item etc obviously with different names. I could use echo to...
8
by: =?Utf-8?B?bWljaGFlbCBzb3JlbnM=?= | last post by:
I created a user control that handles certain keystrokes, e.g. Ctrl-C for cut, Ctrl-V for paste, plus other more specialized keystrokes. I want to list these in the menubar like any other menu...
5
by: giandeo | last post by:
Hello Experts. Could you find a solution for this problem please! I have the following tables in Access Database Table Name: origin Fields Names: country, countrycode Table Name: make...
2
by: Sathish Kumar | last post by:
Anyone have idea how to build a configurable menu control. The menu items must be read from XML or from the database & the items must be built. Options must be provided for generating horizontal or...
1
omerbutt
by: omerbutt | last post by:
hi every one i have a menu li and ul based the problem is when any specific category in the li is hovered the li or the sub-cat items appear but as i move my mouse over the sub-cat or level two li it...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...
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
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...

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.