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

Floodgauge not showing text #569

Open
MatthiasJaeger opened this issue Apr 30, 2024 · 0 comments
Open

Floodgauge not showing text #569

MatthiasJaeger opened this issue Apr 30, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@MatthiasJaeger
Copy link

Desktop (please complete the following information):

ttkbootstrap Version: 1.10.1
OS: Debian Linux
Python Version: 3.11

Describe the bug

The Floodgauge widget does not display the intended text information passed via fg.configure('text') or fg.textvariable.set('text'). Only way working in minimal example is fg.textvariable = ttkb.StringVar(fg, text). Using this method causes issue #441 when multiple Floodgauge widgets are present.

To Reproduce

Run the following minimal script:

import ttkbootstrap as ttkb

root = ttkb.Window()
root.title('Test')
fg = ttkb.Floodgauge(root, value=0, maximum=100)
fg.grid(column=0, row=0)

value = 0


def update():
    global value
    value = (value + 1) % 100
    text = 'TEST ' + str(value)

    # using configure
    fg.configure(value=value, text=text)

    # using variables
    fg.variable.set(value)
    fg.textvariable.set(text)
    
    # setting variables
    # fg.variable = ttkb.DoubleVar(fg, value)
    # fg.textvariable = ttkb.StringVar(fg, text)

    root.after(50, update)


root.after(50, update)
root.mainloop()

Expected behavior

Floodgauge with changing text and fill state.

Screenshots

behavior:
image
expected bahavior:
image

Additional context

No response

@MatthiasJaeger MatthiasJaeger added the bug Something isn't working label Apr 30, 2024
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