Changing the colour of a wxTextCtrl when Enabled=False

Viewed 186

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.

2 Answers

Call SetEditable(false) for the text control to block input.

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

Regards Xav'

Related