Options
Since Frame and Toplevel widgets share similar tasks in Perl/Tk, they share similar options, as listed here. The two following sections list the options that apply to both widgets. After that we’ll cover the specific options that haven’t yet been covered in a previous chapter.
-
-background =>color Sets the color of the widget’s background area (there is no foreground area).
-
-borderwidth =>amount Sets the width of the widget’s edges. Default is 0.
-
-class =>classname Indicates the class associated with the widget instance in the option database. This option can actually be used on any widget, not just a Frame or Toplevel.
-
-colormap => "new" | $window Specifies whether to use a new colormap or share one with another widget in the application. If a colormap value is not specified, the window uses the display’s colormap.
-
0 If true, this Frame/Toplevel will be used to contain another embedded application, typically another Tk application.
-
-cursor =>cursorname Changes the cursor to use when the mouse pointer is over the widget.
-
-height =>amount Sets the starting height of the widget in a valid screen distance.
-
-highlightbackground =>color Sets the color the highlight rectangle should be when the widget does not have keyboard focus.
-
-highlightcolor =>color Sets the color the highlight rectangle should be when the widget does have the keyboard focus. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access