473,653 Members | 3,015 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Setting state of menu-items ?

Hi,

In .NET , when working with menus handlers :
Is there an equivalent of an in MFC used event : UPDATE_COMMAND_ UI ?

For those not familiar with the name UPDATE_COMMAND_ UI :
it is an event that is fired when one clicks on a topmenu-item (not a
childmenu-item)
(example of a topmenu-item : 'Edit ' and childmenu-item would then be
'Paste' or 'Copy')

This event is called as many times as there are childmenu-items in the
top-menu and thus enabling you to set the state of each individual
childmenu-item (enabled, checked,...) BEFORE the dropdown-menu is shown.

Anybody knows ?
Thnx

Christian
Nov 15 '05 #1
1 1365
U can use the On_Select event for the top-menu item u want to have this
feature . Then in the triggered event set the states of the child-menu
items.

so it should be something like this

private void On_Select_MenuI tem1 (..., ....)
{
MenuItem2.Enabl ed = false;
MenuItem3.Visib le = false;
// ......
}

hope this helps
"Chris" <ch********@pan dora.be> schreef in bericht
news:ed******** *************@p hobos.telenet-ops.be...
Hi,

In .NET , when working with menus handlers :
Is there an equivalent of an in MFC used event : UPDATE_COMMAND_ UI ?

For those not familiar with the name UPDATE_COMMAND_ UI :
it is an event that is fired when one clicks on a topmenu-item (not a
childmenu-item)
(example of a topmenu-item : 'Edit ' and childmenu-item would then be
'Paste' or 'Copy')

This event is called as many times as there are childmenu-items in the
top-menu and thus enabling you to set the state of each individual
childmenu-item (enabled, checked,...) BEFORE the dropdown-menu is shown.

Anybody knows ?
Thnx

Christian

Nov 15 '05 #2

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

Similar topics

2
3221
by: Askari | last post by:
Hi, How do for do a "select()" on a CheckButton in a menu (make with add_checkbutton(....) )? I can modify title, state, etc but not the "check state". :-( Askari
3
2815
by: Matt Garman | last post by:
I'm working on a curses-based application in Python. I've implemented what I call a "Chooser" (a fancy name for a menu): ---> 1. Choice 1 <--- 2. Choice 2 3. Choice 3 So the user can use the arrow keys to change choices. When he hits enter, the screen is re-drawn with a new interface. When that interface is quit, the screen should return to the Chooser, exactly
6
1797
by: Karl | last post by:
This might not really be a javascript question, but I'll start with this group. At http://www.gazingus.org/ there is a very nice collapsible menu written using CSS and Javascript >>>> Using Lists for DHTML Menus HTML lists, along with well-placed CSS and JavaScript, result in flexible dynamic menus that gracefully degrade in older browsers.<<<<<<<
0
876
by: Phillip N Rounds | last post by:
I have a web app that I am having state management issues with. I have a frames page, with one frame containing a JavaScript menu, the second frame containing a data entry screen in ASP.NET The user clicks on a menu item, and a specified version of the MyDataEntry.aspx gets presented. In MyDataEntry.aspx, data is entered, the user clicks the save button, the data gets inserted into a database, and a new version of the JavaScript menu...
7
10345
by: Andrew Robinson | last post by:
I have a treeview control that I use as a menu & navigation control within a master page. The nodes for this control are loaded from a database which contains the text and url of each like and the hierarchy of the menu tree. All pretty normal stuff. Is there any simple method of maintaining the expanded / collapsed state of each node as my application moves from page to page? Remember this is on a master page used by numerous content...
4
4332
by: Sam | last post by:
I have an asp.net 2.0 app that uses a sitemap, Master Page, and has several content pages. While this feature has simplified the process of creating a data-driven site menu, it does seem to have some big restrictions. Namely, maintaining state on the Master Page across all content pages. I simply want to keep track of a key value across all content pages. The only solution I can come up with is using a session variable, which I hate.
1
1200
by: empire5 | last post by:
Menu: foo bar foo1 bar1 foo2 bar2 foo3 bar3 When the mouse is over foo2 I want foo2 to be green. When the mouse is over bar2 I want bar2 it to be orange. How can I do this? I know about setting the hover properties which works if I want both foo2 and bar2 to be green.
5
1777
by: Bubba | last post by:
I have a dynamic pulldown list (ASP with javascript) that when a user picks a state, the corresponding counties for that state appear in a dynamic second pulldown list. When I submit the form, the values for state and county are numerals 1 (for the state) and 2 (for the county selected) and not the values for the state and county ???? any help appreciated! <!--#include file="dbaseconnection.asp" -->
0
929
by: stuie_norris | last post by:
Hi I am trying to change the debugger setting on my version of Visual Studio 2005 Professional. Unfortunately I do not have the Execptions menu item under the Debug menu. Is there a setting I could have the disables the Exceptions menu under the Debug menu?
8
16091
by: Andrus | last post by:
..NET 2 Winforms application. How to create new setting and set it default value in userSettings section of app.config file or overwrite existing setting value ? I found code below in this list which modifies Application setting section but how to add new item to userSettings ? Andrus.
0
8283
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8811
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8704
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8470
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8590
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5620
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4147
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2707
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1591
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.