How to disable checkbox?

I am working through errors in upgrading to Kinetic. I need to enable or disable a set of checkboxes base on the checked status of another. I get the error 'Ice.Lib.Framework.EpiCheckBox.Enabled' is obsolete: ‘EpiControls should use ReadOnly instead of Enabled’ . I tried using ReadOnly with no effect, the user can continue to select any checkbox. Also, having the checkbox disabled allows the user to see what choices are available. Sure I can disable the warning with #pragma warning disable 0618, 0162, but is there a way to disable the checkbox?

I’ve come across this quite a bit. Sometimes the “ReadOnly” works, and sometimes it doesn’t.
I haven’t cared enough to really worry with it. I just use the “Enabled” property when it doesn’t and the “ReadOnly” when it does.

If you want, you should be able to cast the checkbox to a regular Windows Forms Control and use that enabled property and see no warning.

1 Like

Try IsEpiReadOnly instead of ReadOnly.

I tried to cast to a regular Windows Forms Control. It would not let me.

I will try this later, for now I will just disable the warning and move on testing other customizations.