Previous section   Next section

Practical Programming in Tcl & Tk, Third Edition
By Brent B. Welch

Table of Contents
Chapter 48.  Tcl 7.4/Tk 4.0

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.

      Previous section   Next section