Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python 3.4, How to increase the size of the tkinter spinbox widget arrowheads?

How do you increase the size of the tkinter spinbox arrowheads?

root = Tk()
Rtitle = Frame(root)

valueChanger = Spinbox(Rtitle, from_=0, to=10, wrap = True, width = 0)

valueChanger.pack(side=RIGHT, padx = 5, ipadx = 2, ipady = 5)

Rtitle.pack(side = TOP, fill=BOTH, expand=True)


root.mainloop()

Thanks in advance :)

like image 389
Joe Arrowsmith Avatar asked Nov 29 '25 01:11

Joe Arrowsmith


1 Answers

The arrow buttons are each half the height of the box. Increase the box height by increasing the font size. Minimal complete verifiable example (of the sort people should post when asking questions ;-):

from tkinter import *
from tkinter.font import Font

root = Tk()
spin = Spinbox(root, from_=0, to=9, width=3,
               font=Font(family='Helvetica', size=36, weight='bold'))
spin.pack()
like image 56
Terry Jan Reedy Avatar answered Nov 30 '25 15:11

Terry Jan Reedy



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!