473,385 Members | 1,356 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,385 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 1791
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: 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...
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...

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.