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?
Could you please take a look at the attached sample with UltraCheckEditor. If you have any questions, please do not hesitate to write me
I have seen that your sample works fine. I figured out that my .ISL file makes the difference.
If I change your ISL-file (IG.ISL) to my project ISL-file, the controls gets hidden.
I have attached my ISL file and finally you maybe can tell me what happens here. My ISL file is based on the office black ISL file that becomes installed with NetAdvantage. I just have made some changes to the grid properties as I can remember.
If we can solve this in a easy way, ok. If not, it is not very imported for me if the check box shows some hoover appearance or focus rect.
Could you please take a look at the modifications that I made in the sample and your AppStyle. Also please take a look at the attached video for more details.
Part 2
this is the sample with your AppStyle
Thanks for you response. I`m not able to record too big video files, because it is not possible to upload it in the forum, but your guess is correct. I made modifications in the AppStyle and I set all states with the same image. :)
If you have any further questions, feel free to write us.
I could install WinRar and watched the video now.
I have copied your source to my test sample from your previous post but I'm not sure what the video is showing me. If I open my ISL-file and switch to custom glyph, I have no preview. If I save the ISL and restart AppStylist, I can see a preview without checkbox (app stylist bug?).
I guess you have copied the same image to all states (normal, mouse over, etc.). But after switching to custom, I have nothing to copy??
I have saved the images from your modified ISL and imported it to my test.isl. Setting all states like the normal state and it works.
I think I have seen how to use this possibility.
Thank you for your help.
Sorry. I made a misstake. Here is the right sample. About the video file, please download both parts of video files and using WinRar uncompress it. The video is AVI format, so you could run it using Windows Media Player.
Please let me know if you have any questions.
I can not read your video format (vlc player, window media player) and I have no idea what you are showing me in the attached sample (grid filter....).
Markus