Hi,
I'm working on a winform control with textboxes that are not modified in any special way except that they are set to be read only. When I right click on the control, I'm given the following context menu
Undo(disabled)
Cut (disabled)
Copy (Disabled)
Paste (ENABLED)
Delete (Disabled)
Select All (Enabled)
Right To left reading order (enabled)
Show Unicode control Chars (enabled)
Inert Unicode Control Character (ENABLED)
The issue is that Paste and Insert Unicode Dcontrol characters should both be DISABLED when this control is read only. Is there something that I'm missing?
-Chris
Hi, we're going to live with the behavior as is because we don't have the time to re-implement the context menus (we still want the ability to copy and select the text, so disabling is not an option).
Also, we need to plan on upgrading to the latest version before putting any hacks in to work around unwanted behavior. So that will take us some time to plan in as well.
Thanks for the feedback.
I just wanted to know if you were able to use set The context Menu corectly or you still need help? Just let me know.
Sincerely,DimiDeveloper Support EngineerInfragistics, Inc.
Hi Chris,
The term "edit mode" is a little weird in this case.
Even when the control is Readonly, it has to go into edit mode so that you can select the text and copy it, even though you cannot actually edit.
You could, of course, set Enabled to false, and this would remove the context menu entirely. But that means your users could not copy from the control, either.
You could also replace the ContextMenu on the control by supplying one of your own. But it's all or nothing. If you supply your own context menu, you have to handle what happens when the user selects an option from that menu.
Hi, sorry, I should have clarified, I'm using v8.2...not sure if upgrading is an option, but thanks for verifying.
Re: UltraTextEditor in edit mode, why does an UltraTextEditor go into edit mode if the control is Read Only?
I tried this out y placing a new UltraTextEditor (v9.2) on a form and setting the ReadOnly property to true. I run the app and I am not getting the same behavior you describe.
My Paste option is correctly disabled.
I am seeing that the Insert Unicode Control Character option is enabled. But when I try the same thing with the Inbox TextBox control, I get the same results, so this is apparently correct behavior. Clicking on this option to attempt to insert a character doesn't actually do anything, but the item is supposed to be enabled.
In fact, when the UltraTextEditor is in edit mode, it displays an inbox TextBox control over itself, anyway. So the context menu you see here is actually the built-in context menu from the inbox TextBox and the UltraTextEditor doesn't really have any control over it.