How to get rid of "Ice.Lib.Framework.EpiTextBox.Enable" is obsolete warning in C# editor

Here’s the full message:

CS0618 - line 1635 (1635) - ‘Ice.Lib.Framework.EpiTextBox.Enabled’ is obsolete: ‘EpiControls should use ReadOnly instead of Enabled’

I’ve tried going back to all my newly added textboxes and reseting the Enabled value to default, but that doesn’t work as I still get the message.

The line number I’m assuming pertains to the hidden code for the form itself, not the customization code as there is nothing pertaining to Enabled or a textbox at that line number.

I’d love to find out which textbox is the culprit so I can nerf and recreate it, which should get rid of the message.

Otherwise, the only thing I can think of is to nerf all of the custom textboxes but there are plenty of them.

Any thoughts? Bueller… Bueller… anyone… Bueller?

You should use

txtBox.IsEpiReadOnly = true;

Or even better ExtendedProperties.

But if you really need to use Enabled or ReadOnly, which I also use when I have a valid case, you can disable the warning. Let’s face it… ReadOnly and Enabled aren’t really going anywhere, they will remain part of WinForms.

Add this underneath of your using statements.

// one is for Enabled, one is for using return; in a void method
#pragma warning disable 0618, 0162



Thanks for the quick response.

I should have stated that I don’t use any code with Enabled or ReadOnly, I actually set it in the Properties Designer for the Customization. Setting them back still leaves them in a non default state so the error/warning persists.

I’ll just disable them, thanks for that tip. It’s more of an annoyance that I have to click into that window and scroll down just to see if there are any actual errors.

I think it is a bug in IDE, if you have a look at the custom XML it appears as an artifact there as Enabled = False.



Fortunately when you hit F5 no more error message :slight_smile:


So if you really wanna get rid of the message UPGRADE, UPGRADE, UPGRADE…:slight_smile:

If were so easy this problem would have been solved on the 16th of May :slight_smile:.

Just a bit more on the testing. I just set a text box to enabled = false and the custom xml showed as false and the text box was disabled after closing and opening. Changed enabled = true, closed and opened. Text box was enabled and the custom xml had the value of true. :slight_smile:

1 Like

Remove it from the xml in the actions menu
Find the xml line that refers to enabled and just delete it


Hell I got the same message for my buttons!!! That enabled is obsolete and should use readonly…

But the property grid does not show a readonly option…for the epiButton…and enabled is present… So they show a message that is obsolete…but still provide the ability to set it… :thinking: bizarre…

Mind you, I had to use button.ReadOnly instead in code and no longer had the message…

But the properties should reflect this “change”… but moreover…why is it obsolete suddenly to use enabled property?


Worse, combo boxes often don’t respect “read only” either on the control or via extended properties on the data. Or is that just me?

Thanks everyone. Using all your responses, not only have I resolved it but I’ve learned a few new things. I’m listing them here for future users.

This warning/error can be shut off/ignored by putting just after your ‘using’ and before ‘public class Script’. Thanks to hasokeric for that tip.

#pragma warning disable 0618, 0162

I found that the All Code checkbox allowed me to see the read only code so I could identify which two were the culprits based on the line numbers of the warnings.

josecgomez guided to the Custom XML Editor.

I couldn’t find the Enabled property in the XML View, but could use Hally’s ‘Custom Properties’ tab to find the Enabled properties for the 2 textboxes, select them, and press delete.

Thanks for the support community!