Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

One menu for multiple forms

Status
Not open for further replies.
Mar 9, 2006
93
CA
I have a MainMenu that I created with several menu items. This menu is on my main form. The user can click on a different language (menu item) and this sets that menu item to checked. The problem I am having is when one of the language menu items is checked and the user clicks a button to open a different form (which has the same menu), this new forms menu does not have the items checked that the main form had. Does anyone know how I can do this? Thanks for your time.
Matt
 
The language property should be set on some kind of controller. This controller could then throw an event to notify other listeners of the language change. Your menu's could react to that event and automatically change their checked value.

The other option would be to implement the observer pattern where the controller sets the menu checked state for you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top