question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add style for readonly widgets

See original GitHub issue

Some 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:closed
  • Created 2 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
israel-dryercommented, Nov 22, 2021

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 the selectbg color for dark themes seems to give the best result.

python_cfQlOmSil9 python_bg5ocrsgqD
1reaction
daniilScommented, Oct 14, 2021

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?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found