Add style for readonly widgets
See original GitHub issueSome widgets support the readonly
state, which currently doesn’t look any different from the default
state. Taking ttk.Entry
as an example, I’d consider either making it similar to the disabled
state but with more contrast to keep the text readable, or give it the same style as a ttk.Label
, with the border only appearing on hover and/or focus.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Updating QWidget style after setting it readonly - Stack Overflow
What works for me is to force an update like this widget->setStyleSheet(widget->styleSheet()); , by just setting the same stylesheet.
Read more >Adding custom styles to read only checkboxes - WebViewer
We have some custom styling which is working fine for all fields except checkboxes that have been set to read-only. They're having styling...
Read more >read-only - CSS: Cascading Style Sheets - MDN Web Docs
The :read-only CSS pseudo-class represents an element (such as input or textarea ) that is not editable by the user.
Read more >Inputs in Form get ReadOnly CSS class - OutSystems
Hi,. I've found something ridiculous (as far as for me): when an Input widget in placed inside a Form widget it gets "ReadOnly"...
Read more >Tkinter - Read only Entry Widget - GeeksforGeeks
Tkinter supports different widgets of which the Entry widget is used ... the set() method is used to change the value of the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m currently in the process of adding the state-based “readonly” style. As of now, I think using the
light
color for light themes and theselectbg
color for dark themes seems to give the best result.In my specific use case, I use readonly entries as part of a table for cells that shouldn’t be editable. The difference from disabled entries is that the contrast makes them a lot less readable (which makes sense for the disabled style). Sticking with Bootstrap styles, I thought something like this could make sense?