HighTechTalks DotNet Forums  

Menu / Tool Strips..

Dotnet Framework microsoft.public.dotnet.framework


Discuss Menu / Tool Strips.. in the Dotnet Framework forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Vijay
 
Posts: n/a

Default Menu / Tool Strips.. - 04-13-2006 , 06:03 PM






Why wasn't the toolbar, menu bar items developed as a single BarItem and
then allowed us to build as Toolbar or a MenuBar. This way I could just have
one click event. I do have in my code in a method for say a toolbarItem
click.. But when I add the same to a menu, I have to attach a item click
event and call the method. If it was developed as a single BarItem, life
would have been easier. Any reason why it is not done so?

Vijay



Reply With Quote
  #2  
Old   
tlkerns
 
Posts: n/a

Default RE: Menu / Tool Strips.. - 04-14-2006 , 08:39 AM






I believe you can do this with one event handler:

Private Sub MenuOrTool_Click(ByVal sender As Object, ByVal e As EventArgs) _
Handles MenuItem.Click, ToolStripItem.Click
....
End Sub

Tony

"Vijay" wrote:

Quote:
Why wasn't the toolbar, menu bar items developed as a single BarItem and
then allowed us to build as Toolbar or a MenuBar. This way I could just have
one click event. I do have in my code in a method for say a toolbarItem
click.. But when I add the same to a menu, I have to attach a item click
event and call the method. If it was developed as a single BarItem, life
would have been easier. Any reason why it is not done so?

Vijay




Reply With Quote
  #3  
Old   
Vijay
 
Posts: n/a

Default Re: Menu / Tool Strips.. - 04-14-2006 , 09:15 AM



That is like calling a Function from 2 events.. or even in C# you can attach
same event function to 2 events.. But what I am talking is different.. It is
just not event. It is just one object that can be referenced in menu and
toolbars, Could that save size? yes it can. Also I don't have to worry about
making sure I have the bitmap or icon attached is same to the menu and
toolbar item.. lot of benefits.. Most third party companies that offer the
Toolbar/Menu components provide this.. I am surprised Microsoft did not do
this...., when their line is "Do more with less"

VJ

"tlkerns" <tlkerns (AT) discussions (DOT) microsoft.com> wrote

Quote:
I believe you can do this with one event handler:

Private Sub MenuOrTool_Click(ByVal sender As Object, ByVal e As EventArgs)
_
Handles MenuItem.Click, ToolStripItem.Click
...
End Sub

Tony

"Vijay" wrote:

Why wasn't the toolbar, menu bar items developed as a single BarItem and
then allowed us to build as Toolbar or a MenuBar. This way I could just
have
one click event. I do have in my code in a method for say a toolbarItem
click.. But when I add the same to a menu, I have to attach a item click
event and call the method. If it was developed as a single BarItem, life
would have been easier. Any reason why it is not done so?

Vijay






Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.