I'm using version 11.2.20112.2050.
I have to show some state flags as read only information to the user. My prefered controls are UltraCheckEditor (multiple choice flags) and UltraOptionSet (single choice flags). I can not find any possibilities to make these controls read only.
I have tried set the control to disabled and set appearance attributes like backcolordisabled to look enabled. But the markers looks still disabled which is not acceptable.
Can you give me some advises how to achieve this or any other suggestions etc.
Thank you.
Regards. Markus
Hello Markus,
Maybe one possible approach to solve this task, could be if you inherite our controls and extend it with ReadOnly property. I made small sample for you with UltraOptionSet control. You could use the same approach for UltraCheckEditor. Please take a look at the attached sample for more details and let me know if you have any questions.
Regards
Hi Georgi,
thanks for your help. I could create the read only option set control in my solution and it looks good for me!!
I have extended your sample with OnKeyDown event handler to prevent selecting a item by pressing the space bar.
protected override void OnKeyDown( KeyEventArgs e ) { if ( readOnly ) { this.Invalidate(); return; } base.OnKeyDown( e ); }
To make it perfect, can you please give some advises for the following:
- if the mouse moves over the control, the items show the hoover appearance. Can I switch this off?
- if I click a item, the focus rect is showed. Can I prevent this?
this is the sample