Hi All,
I'm using an UltraTextEditor embedded in a wingrid cell but I can't see how to trap the TextChanged event of the editor. Providing an event handler for the editors TextChanged event is not working, I assume there is something else I need to trap for an embedded text editor?
Denis
When you're embedding an EditorControl within the grid, you can't rely on many of those editor's events being fired, since it is the Owner's responsibiliy of managing the editor (there are some exceptions when the grid doesn't have a corresponding action, like the EditorButtonClick, or LinkClick in the UltraFormattedTextEditor, that will be fired on the main control). What you should be doing in this particular case is looking at the CellChange event of the grid.
-Matt
Thanks Matt, that's great.
While entering text into the editor I want to display a panel under the editor which will contain a grid of matching values which change as the user types. Any ideas on how I can display this panel but still keep the focus on the editor? I know this could be acheived using an UltraDropDown or UltraCombo as the editor but my control cannot have a dropdown button and the dropdown list needs to be a multi column grid.
You might be able to use a CreationFilter to remove the button that's a part of the UltraCombo, then call PerformAction(UltraComboAction.DropDown) when you want to show the dropdown area. You could also just manually show a borderless top-level window below the editor, though it might be easier to leverage the existing functionality of the UltraCombo and just remove the button. You can find examples of creation filters in the KB.
Thanks Matt. I need to provide the ability for a user to use shortcut keys for their search, i,e, if they type in ".i" then the search will be performed on ID or if they type in ".n" then the search will be performed on Name, etc..
For this reason I think I will have to take the displaying a window below the editor approach. How exactly can I get this window to pop up and still maintain focus in the editor? I am currently using a borderless form object with a grid control as my pop up window but when I call the Show() method on this it takes focus and I cannot continue typing in the editor. I assume I have to pass something to the Show() method to force the window not to take focus?
I think you might have to ensure that the window is set to TopLevel and that you pass in your current form as the owner to the Show method. While this is a good idea anyway (such as if the user minimizes the main form or closes it), I'm not sure that it will have any effect on the focus, so you would probably need to manually set focus back to your main form after you show the popup. You might also be able to use the DropDownManager's static DropDown method to show a control and that may prevent the editor from losing focus.
I think I am going to have to use this DropDownManager.DropDown method to acheive what I need. Are there any examples available of how to use t his method?
Thanks,
There are no samples that I am aware of for this method, but you should be able to experiment by passing off the control, size of the control (or drop down area), the exclusion rect (which is the rect of the area that you don't want the dropdown to cover, such as the button or editor itself), and its position. Note that I'm not entirely certain that this will completely solve your focus issue, but it's something worth messing around with.