ToolBar Button Click

Topics: CAB & Smart Client Software Factory
Jun 2, 2006 at 3:24 AM
originally posted by: jofreder

I have this almost working the way I need. I am still learning it so I need some help with this after reading anything I could to find help. I have a Module that has several views. I load them and close them in the _rightworkspace. Now in ModuleController.cs I add a Save button to the tool bar (Shell.Layout). My issue is I need the save button for different views when they get loaded but how do I set the Button click of the toolbar item to process save in the current view. It seems to me that the CommandHandler that I set up in the first view always gets called. Did I miss something as I do not kow how to recreate the button since it happens in ModuleController.

Jun 2, 2006 at 4:10 AM
originally posted by: rschrieken

You might add a WorkItem (which loads form your module and shows the views). The workitem then has the CommandHandler. A workitem knows if it is active or not and will in thsat case not fire tre CommandHandler
Jun 2, 2006 at 4:32 AM
originally posted by: jofreder

Is this the same as what you suggest.

CompanySetupView view = WorkItem.Items.AddNew<CompanySetupView>();

When I want to open a different View I Close the currentone and open another in the same way. Is that incorrect?

Thanks For the help