Hi,
I want to have a ComboBoxTool filled with several default values, but the user should also be able to enter values on his own. You can compare this to Outlooks reminder function of tasks and appointments where one can select out of several configured values (remind again 5 mins. before start, 10 mins. before start, in 1 hour, etc.) but one also can enter a value on its own (remind again in 19 hours, ...).
I want to be able to accept user input, when enter is hit. But unfortunately OnEnterKeyPressed() never gets called so that I don't really know, when the user is done entering data.
Kind regards,
Michael
Michael,
Try handing the UltraToolbarsManager's ToolKeyPress event. In this event, first check to see which Tool is triggering this event, and if it is the ComboBoxTool, then check the KeyChar to see if the Enter key was pressed. The code, in C#, would look something like:
private void ultraToolbarsManager1_ToolKeyPress(object sender, ToolKeyPressEventArgs e) { if (e.Tool.Key == "ComboBoxTool1") { if (e.KeyChar == '\r') { MessageBox.Show("ComboBoxTool Enter key pressed"); } } }
Hope this helps,
~Kim~
Thank you very much, this should work.