473,385 Members | 1,642 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.

VB.NET 2005 and ToolStripMenuItem

Hi,

I've create an application which includes :
- a toolstrip
- a toolstripmenu
- several toolstripmenuitem(s)

so, now i have a menu like that :

-File
|
|-New
|-Open
|-Save
....

With normal menu control, each submenuitem has an index value that allows me to know exactly which one has be clicked.
But i do not see any index property in the ToolStripMenuItem control...

So, how can i detect which subitem has been clicked ?

thanks a lot,
Maileen
Nov 21 '05 #1
2 6108
Hi,

Each menu item will have its own click event.

Ken
--------------
"Maileen" <no*****@nospam.com> wrote in message
news:eK*************@tk2msftngp13.phx.gbl...
Hi,

I've create an application which includes :
- a toolstrip
- a toolstripmenu
- several toolstripmenuitem(s)

so, now i have a menu like that :

-File
|
|-New
|-Open
|-Save
...

With normal menu control, each submenuitem has an index value that allows
me to know exactly which one has be clicked.
But i do not see any index property in the ToolStripMenuItem control...

So, how can i detect which subitem has been clicked ?

thanks a lot,
Maileen

Nov 21 '05 #2
Each menu item has a name property, rather than an index number.
They can be referenced that way.

Each menu item is an object in its own right, with its own events, methods,
properties, etc.
"Maileen" <no*****@nospam.com> wrote in message
news:eK*************@tk2msftngp13.phx.gbl...
Hi,

I've create an application which includes :
- a toolstrip
- a toolstripmenu
- several toolstripmenuitem(s)

so, now i have a menu like that :

-File
|
|-New
|-Open
|-Save
...

With normal menu control, each submenuitem has an index value that allows
me to know exactly which one has be clicked.
But i do not see any index property in the ToolStripMenuItem control...

So, how can i detect which subitem has been clicked ?

thanks a lot,
Maileen

Nov 21 '05 #3

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

Similar topics

0
by: genojoe | last post by:
I have a menu structure that formats that left aligns string1 and right aligns string2. To do this, I use the OwnerDraw, Popup, DrawItem and MeasureItem properties or events of the MenuItem class....
8
by: Ryan | last post by:
Ok.. I have a form with lots of stuff on it; a tool strip panel, menu strip, data binding elements (dataset, binding source, table adapter), tab control with 7 tab pages, each page contains a...
1
by: =?Utf-8?B?RjVGNUY1?= | last post by:
I have created a control by inheriting ToolStripMenuItem that has an image property called LargeImage. ------ public class EventSubMenuItem : ToolStripMenuItem { private Image _largeImage =...
6
by: Luqman | last post by:
How can I dynamically Add menuStrip and its menuItems through code using VB.Net 2005 ? Best Regards, Luqman
1
by: Justin Cherniak | last post by:
I have a ToolStrip item which fires a function when clicked. The function will run to completion without any problems (if I set a breakpoint at the closing brace, no exception has been fired), but...
3
by: =?Utf-8?B?bGpsZXZlbmQy?= | last post by:
I need to show a custom control in the DropDown of a Windows.Forms.ToolStripMenuItem (e.g., similar to the Font Color menu item in Word except that the control is specific to my application). I...
0
by: Dean Slindee | last post by:
I need to be able to separate toolstripmenuitems from toolstripseparators, both of which are children of a toolstripdropdropbutton. The last statement does not pass validation. Is there any way...
3
by: Martijn Mulder | last post by:
My application has a standard MenuStrip on top of the window and a ContextMenuStrip that pops up when the user clicks the right mouse button. I have defined a ToolStripMenuItem that I want to...
0
by: kyungdongkim | last post by:
Hi, I have a dynamically generated MenuStrip following this example: http://www.codeproject.com/useritems/Dynamic_MenuStrip.asp Basically the menu strip allows users to save and load reports. ...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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
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.