I need to know that a user has clicked on a StateButtonTool that is already checked. Once checked, the ToolClick event will not fire.
The StateButtons I have are members of a PopupMenuTool.
Any help is appreciated.
RegardsDave Dawkins
A bit more hacky than I'd expect from Infragistics, but it will do. Thanks very much!
Regards
Dave D
Well in that case, you can try to implement your own AllowAllUp = False functionality. Set AllowAllUp to True to allow the user to uncheck items. Now you will get the ToolClick event when they click a checked item. In the handler, you should be able to iterate all StateButtonTools in the OptionSet. If none are checked, you can set Checked back to true on the StateButtonTool in the ToolClick event args, which will maintain the check on the item the user clicked.
Hi Mike,
thanks for looking at this. Yes, it is part of an OptionSet as you say.
When my user selects the button, it is not to uncheck it, but to initiate the associated operation again.
Our app has a "FastForward" button, and the user can select a speed multiplier. The button has a dropdown (so really it is a PopupMenu with the "SplitButton" attribute), and the dropdown menu has the multipliers on it. When the user selects "x10" then the app fast-forwards at x10.
This only works if x10 wasn't already selected though - hence this thread.
Of course, I have it so that selecting the "FastForward" button itself uses the checked value in the drop-down, but the user is likely to pull the menu down and review the last selected value, decide it's what they want and select it again (click on a statebutton that's already checked) - however this time, no ToolClick and no fast-forward.
Thanks again
I cannot reproduce this issue. The ToolClick is firing when the tool is check and unchecked. Is your StateButtonTool part of an OptionSet which has AllowAllUp set to False. If so, you cannot uncheck it by clicking on it. You can only uncheck it by clicking on another StateButtonTool belonging to the same OptionSet.