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
165
How to disable the context menu on the UltraTextEditor
posted

Hi, 

i have a UltraWinGrid in which there is a cell composed of UltraTextEditor. in this cell, i want to enable user to select the items in a CheckedListBox, and then show the items in the cell. it would work like following,

The below is  some code,

CheckedListBox listView = new CheckedListBox();

DropDownEditorButton dropDown = new DropDownEditorButton();

UltraTextEditor textEditor = new UltraTextEditor();

textEditor.Enabled = false;

textEditor.ReadOnly = true;

textEditor.ContextMenu = null;

dropDown.Control = listView;

textEditor.ButtonsRight.Add(dropDown);  

listView.Sorted = true;

listView.ContextMenu = null;

listView.CheckOnClick = true;

listView.Width = cell.Width;

string[] items = .....

listView.Items.AddRange(items);

cell.EditorControl = textEditor;

...

cell.Value = selectedItems;

...

So my problem is,  after the selected items showed in the cell, i don't want the user could edit them or type anything in the cell, i make it work by capturing the keyboard events. but the user could still right click on the showed text to pop-up the contextmenu to do "cut" or sth else. so how do i disable this?

thanks.

Parents Reply Children
No Data