Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
525
Make UltraTextEditor readonly.
posted

Hi,

I have a scenario where the ultratexteditor should be readonly i.e., it should act like a label. I also have a dropdowneditorbutton to the button collection of the editor.

I want to get rid of the cursor in the text box on focus. How can I achieve this?

Thanks,

-ng

  • 469350
    Suggested Answer
    Offline posted

    Hi,

    I don't think this is possible. In order to click the editor button, the control has to be able to enter edit mode.

    Perhaps what you need to do is use an UltraDropDownButton control instead of an UltraTextEditor.

  • 37774
    Suggested Answer
    posted

    The UltraTextEditor uses a .NET TextBox as its editor, so I'm not really sure that there's a great way to accomplish this.  When you set the UltraTextEditor to ReadOnly, it sets the TextBox to ReadOnly as well, which will show the cursor and allow the user to select text, but prevent any changes from occuring.  Normally you could prevent this by cancelling the BeforeEnterEditMode event, but this will also prevent the dropdown button from working correctly since the buttons cannot function properly without the editor being in edit mode.

    -Matt