c++codeblockswxwidgetswxtextctrl

Changing the colour of a wxTextCtrl when Enabled=False


Is there a way to change the colour of a wxTextCtrl when it is disabled or another way to lock the control for input when it is enabled?

I don't like the gray text on a gray background, with a gray border, it makes the information inside the control harder to read.

I'm using wxSmith, there is no tag available for it.


Solution

  • You can also give the wxtextCtrl the style wxTE_READONLY at creation time to do the same thing.

    Regards Xav'