Skip to content
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

Multiple FloodGauge with same bootstyle, all show same mask despite different ones set. #513

Open
CLB-rootwave opened this issue Dec 15, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@CLB-rootwave
Copy link

Desktop (please complete the following information):

ttkbootstrap Version 1.10.1
OS: Windows

Describe the bug

When creating multiple flood gauges using same bootstyle, the same mask/text is used for all flood gauges.
If different bootstyles are used for each gauge then the masks appear correctly, but would like to be able to use the same style for all, just each with a different mask.

To Reproduce


import ttkbootstrap as ttk

root = ttk.Window()

#All gauges use the same bootstyle. The mask of the last one is shown on all gauges
c = 0  # column value
for x in range(8):
  fg = ttk.Floodgauge(
      bootstyle=ttk.PRIMARY,
      font=(None, 8, 'bold'),
      mask=str(c)+' {}%',
      value=c*10,
      maximum=100,

  )
  fg.grid(row=1, column=c, padx=4, pady=10)
  c = c + 1
root.mainloop()

import ttkbootstrap as ttk

root = ttk.Window()
#Correct Masks, but each using different bootstyles
x = 0  # column value
for my_style in root.style.colors:
    fg = ttk.Floodgauge(
        bootstyle=my_style,
        font=(None, 8, 'bold'),
        mask=str(x)+' {}%',
        value=x*10,
        maximum=100,

    )
    fg.grid(row=2, column=x, padx=4, pady=10)
    x = x + 1

root.mainloop()


Expected behavior

I would expect each flood gauge to show a different mask and text value. The progress bar reflects the correct value but the text value does not match.

Screenshots

If all gauges use the same bootstyle, all masks are same: image

Expect different masks and values like this:
image

Additional context

No response

@CLB-rootwave CLB-rootwave added the bug Something isn't working label Dec 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant