Internal Button Padding

Buttons and labels have new defaults for the amount of padding around their text. There is more padding now, so your buttons get bigger if you use the default padX and padY attributes. The old defaults were one pixel for both attributes. The new defaults are 3m for padX and 1m for padY, which map into three pixels and ten pixels on my display.

There is a difference between buttons and the other button-like widgets. An extra two pixels of padding is added, in spite of all padX and padY settings in the case of simple buttons. If you want your checkbuttons, radiobuttons, menubuttons, and buttons all the same dimensions, you'll need two extra pixels of padding for everything but simple buttons.

Get Practical Programming in Tcl & Tk, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.