israel-dryer/ttkbootstrap

Floodgauge not showing text

Opened this issue · 0 comments

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