-
July 16th, 2007, 02:06 AM
#1
ToolStripMenuItem enable/disable
Hi,
I'm new in C-Sharp so sorry "easy" for this question.
I come from Win32/MFC world.
I MFC to enable/disable menu item at Runtime I got to make an handler for the UpdateCommandUI and in it enable or disable the item.
Is there a way to do it the same way in CSharp or do I have to enable/disable item each time a menu will be shown?
Thanks
-
July 16th, 2007, 03:30 AM
#2
Re: ToolStripMenuItem enable/disable
Hi
Take a look at this property; ToolStripMenuItem.Enabled Property
Laitinen
-
July 16th, 2007, 04:41 AM
#3
Re: ToolStripMenuItem enable/disable
Hi,
Thanks for the answer,
But it is not what I intend to ask in fact.
I know that .Enabled will do the stuff, but What I'm looking for is the same UpdateCommandUI process in C#.
I mean that the framework come and ask the state of the menuitems when needed and that I don't have to explicitly set the status of items each time I display a menu.
Thanks
-
July 16th, 2007, 04:55 AM
#4
Re: ToolStripMenuItem enable/disable
when the menu is created
and you set enable and disable on it and or on it's items
they will have that state untill you dispose of the object
you dont have to redo properties when ever the menu is being displayed
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|