Search code examples
tkinterbuttonresizesize

Resize buttons of a Spinbox


Is there a way to resize the buttons used in the SpinboxWidget (Tkinter)? I'm trying to build a touchscreen optimized GUI. I couldn't find any suitable option in the docs but maybe there is an other way or I just didn't see the option.


Solution

  • I don't know way to access Spinbox buttons, but you can use Control widget from tkinter.tix:

    import tkinter.tix as tix
    root = tix.Tk()
    c = tix.Control(root)
    c.pack()
    decr = c.subwidget('decr')
    incr = c.subwidget('incr')
    decr['height'] = incr['height'] = 100
    decr['width'] = incr['width'] = 100
    root.mainloop()