Forum Archive

Change default disabled TextField look

wcross

Hi,
I’ve searched the forum to see how to change the default disabled look of a TextField so that it does not have the outline or grey background but no luck. I’ve tried a couple of things but the look does not change.

Any suggestions or advice would be great. I’m trying to make the TextField when disabled look like a label but may have to hide a label under it if there is no way to change the look.

Thanks

JonB

consider using a TextView, with editable = False.

brumm

As a workaround you could use:

        self['textfield1'].bordered = False
        self['textfield1'].background_color = 'blue'
        self['textfield1'].text_color = 'white'
brumm

When you set .bordered to False you can change the settings (workaround)

        self['textfield1'].enabled = False
        self['textfield1'].bordered = False
        self['textfield1'].border_width = 0
        self['textfield1'].background_color = 'blue'
        self['textfield1'].text_color = 'white'
wcross

Thanks for the suggestions. I’ll try changing the settings first suggested by @brumm.

If that fails then changing to a TextView could be an option.

Thanks for the top tips!