Borders and Relief

Example 37-2 illustrates the different reliefs:

Example 37-2 3D relief sampler.


frame .f -borderwidth 10
pack .f
foreach relief {raised sunken flat ridge groove solid} {
   label .f.$relief -text $relief -relief $relief \
      -bd 2 -padx 3
   pack .f.$relief -side left -padx 4
}

The three-dimensional appearance of widgets is determined by two attributes: borderWidth and relief. The borderWidth adds extra space around the edge of a widget's display, and this area can be displayed in a number of ways according to the relief attribute. The solid relief was added in Tk 8.0 to support the Macintosh look for entry widget, and it works well ...

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.