O'Reilly logo

Mastering Perl/Tk by Nancy Walsh, Stephen Lidie

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required