Hi. I have an UltraTextEditor which has an editor assigned to a DropDownEditorButton in the UltraTextEditor's ButtonsRight collection. I only want the user to be able to set the text value of the UltraTextEditor via the DropDownEditorButton's control (iow the user should not be able to type directly into the UltraTextEditor). How do I achieve this?
Thanks in advance.
Hello,
Following Mike’s suggestion I have implemented a simple sample. I made the UltraTextEditor to be ReadOnly and then I assigned the control of the DropDownEditorButton to a TextBox. I also used its TextChanged event to set the text of the ultraTextEditor to the TextBox text.
I hope this is the result you want. Please let me know if you have any additional questions.
Hm. I was going to suggest setting the ReadOnly property to true. I'm not sure if you will still be allowed to push the dropdown button, though.
The only down side of using KeyDown is that the user will not be able to drop down the button via the keyboard. Which probably isn't an issue, since i don't think that will work automatically, anyway, and you could handle the keystrokes in KeyDown if it's important.
I seem to have solved it by supressing the user key press in the KeyDown event.