New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ttk LabeledScale: label covered by hidden element #84400
Comments
The LabeledScale in tkinter.ttk seems to have some kind of hidden element that covers the LabeledScale's label when the value is set to mid-scale. Tested on Windows 10, Python 3.6 See below code to reproduce: import tkinter
from tkinter import ttk
master = tkinter.Tk()
_out1Value = tkinter.IntVar(master)
out1Slider = ttk.LabeledScale(master, from_=-100, to=100, variable=_out1Value, compound="bottom")
_out1Value.set(0) # uncomment to "fix" out1Slider.pack()
master.mainloop() |
3.6 only get security fixes, but your nice minimal, complete verifiable example let me verify easily on 3.9a5 with tk 8.6.9 and 3.6 with 8.6.6 and 2.7.17 with 8.5.19. The hidden element appears to be something like'||' with only part visible, depending on the scale value. It at least partly obscures from -20 to 15. (Clicking the bar moves 1 unit at a time.) This should be tested on other systems, but I suspect that this is an upstream tcl/tk issue. |
This is indeed a tkinter issue and is caused by the placeholder label. As the main label is added to the frame using the place manager, this placeholder is required to make the frame the correct height. I have attached a small diff which lowers this placeholder, fixing the problem (raising the main label does the same thing). |
Right. LabelScale is a tkinter.ttk extension, like OptionMenu. If I do the PR, I would call the placeholder 'dummy' since it is permanent (not removed after initialization). I'd like to see what happens without it and expand the comment to a line like |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: