cursor | Shape of the mouse over the widget, List of Cursor shapes are here . |
font | font style of the Label over it ['Family',size, 'style'] , |
length | Length of the long axis, it is width if orientation is horizontal, otherwise height. |
maximum | Maximum value (default 100) |
mode | determinate (default ) | indeterminate. If the value is not known during the process then indeterminate mode is to be used. The rectanble will bounce back and forth indicating the progress is on. |
bootstyle | Style keyword, options are primary, secondary, success,info,warning,danger, light, dark |
takefocus | False ( default ), If it is set to True then widget is included in focus traversal. |
text | Text to be displayed , associated with floodgauge.textvariable. |
value | Float, the current value of Floodgauge. |
mask | A string format to show the value ( See examples below ) |
**kwargs | Other keyword arguments. |
import ttkbootstrap as ttk
from ttkbootstrap.constants import *
my_w = ttk.Window()
my_w.geometry("400x100") # width and height
c=0 # column value
fg1 = ttk.Floodgauge(
bootstyle=INFO,
mask='INFO ' + '{}%',
value=40,
maximum=100,
length=350
)
fg1.grid(row=1, column=1,padx=15,pady=10)
my_w.mainloop()
fg1.configure(value=65,orient='vertical')
import ttkbootstrap as ttk
from ttkbootstrap.constants import *
my_w = ttk.Window()
my_w.geometry("620x320") # width and height
fg = ttk.Floodgauge(
bootstyle=INFO,
font=(None, 10, 'bold'),
mask='Memory {}%',
value=15,
maximum=100,
length=500,
)
fg.grid(row=1, column=1, padx=10, pady=10,columnspan=3)
def my_upd():
fg.variable.set(fg.variable.get()+10) # increaes value by 10
l2.configure(text=str(fg.variable.get())) # Show on Label
b1=ttk.Button(my_w,text='Jump',command=my_upd,bootstyle=SUCCESS)
b1.grid(row=2,column=1,padx=10,pady=20)
l2=ttk.Button(my_w,text=str(fg.variable.get()),bootstyle=DANGER)
l2.grid(row=2,column=2,padx=10,pady=20)
my_w.mainloop()
import ttkbootstrap as ttk
from ttkbootstrap.constants import *
my_w = ttk.Window()
my_w.geometry("870x100") # width and height
c=0 # column value
for my_style in my_w.style.colors: # List of styles
fg = ttk.Floodgauge(
bootstyle=my_style,
font=(None, 8, 'bold'),
mask=my_style +' {}%',
value=40,
maximum=100,
)
fg.grid(row=1, column=c,padx=4,pady=10)
c = c + 1
my_w.mainloop()
Start() stop() autoincrement of Floodgauge
Displaying number of chars entered in Text widget using Floodgauge