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. ...

Get Mastering Perl/Tk 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.