Trouble on Commnd Status

Topics: CAB & Smart Client Software Factory
Aug 15, 2006 at 4:44 PM
originally posted by: god14

Dear Master-hands,

I met such troubles in my code.

I registered a menustrip item and a toolstrip item as the invokers of a command, then change the command's status at runtime just like that in CommanQuickStart. But what was abnormal is that even when I've set the status to unavailable or disable, the 2 items still seem to be active, but trigger nothing when you click it.

I checked my code and ensure that I've registered the invokers before any attempt to update the status. Judging from the symptom, I also check that none of the command handlers are triggered. So could anybody tell me why the 2 items could be shown in active mode?

Btw, I've tried to restart Windows and it went well for some time, but later, it was back....

Greatly appreciate your help...
Aug 17, 2006 at 11:42 PM
originally posted by: DapinderSingh

Same problem here.
This thing was working fine till last week but today after reading this post when I ran the same scenario, it is not working.
Jan 5, 2007 at 1:52 AM
originally posted by: RobertEwen

Hi,

checkout, if the ToolStripCommandAdaper is registered on startup.
Normaly this is done in class WindowsFormsApplication of CompositeUI.WinForms.

Check if you may have overriden the AfterShellCreated() method, and forgot to call the base implementation of WindowsFormsApplication...

There can obviousliy more adapters handeling the CommandState for UIExtension-Items, so you should have a look, which one you need ...

Kind Regards
Robert