I have placed an ultratoobarsmanager control onto my winform and have added a combox tool to this. I have added the values I wish to have available to uses, using the built in value list.
I now wish to track what option a user has selected and added a 'toolvaluechanged' event. This event fires whenever the comcobox value is changed, however, I'm having trouble finding how to determine what value was selected.
Any suggestions greatly received.
OK. Seems I got there in the end. I used the following in the 'ToolValueChanged' event:
Infragistics.Win.UltraWinToolbars.ComboBoxTool cb = e.Tool as Infragistics.Win.UltraWinToolbars.ComboBoxTool;
_unit = cb.Value.ToString();
Hallo
I have the same problem and was very glad to find that posting.
The statement
Infragistics.Win.UltraWinToolbars.ComboBoxTool cb = e.Tool as Infragistics.Win.UltraWinToolbars.ComboBoxTool won't work.
Can anyone tell me what I am doing wrong?
Strange.
As long as you have that code in the ToolValueChanged event, there shouldn't be a problem. Does the event fire?
Another way to do it (and probably a better way), is to add a 'Control Container' to your toolbar (through the insert new tool option), add a combo box to your form with visible set to false, then point the container control at that combo box. That way you can interact with the combo box exactly the same as if it were on the form.
Hope that helps.