Skip to Main Content
Learning Perl/Tk
book

Learning Perl/Tk

by Nancy Walsh
January 1999
Beginner content levelBeginner
373 pages
9h 43m
English
O'Reilly Media, Inc.
Content preview from Learning Perl/Tk

8.2. Text Widget Options

Options used with the Text method change the way the text is displayed within the text widgets. The following options are standard for all the widgets: -background, -borderwidth, -cursor, -exportselection, -foreground, -highlightbackground, -highlightcolor, -highlightthickness, -insertbackground, -insertborderwidth, -insertofftime, -insertontime, -insertwidth, -padx, -pady, -selectbackground, -selectborderwidth, -selectforeground, -setgrid, -state, -takefocus, -wrap, -xscrollcommand, and -yscrollcommand.

To find out more about what these options do, check back to Chapter 3, where they were first covered.

-background => color

Changes the color of the screen displayed behind the text.

-borderwidth => amount

Sets the width of the edges of the widget.

-cursor => cursorname

Sets the cursor displayed when the mouse cursor is in front of the text widget.

-exportselection => 0 |1

Determines if the text selected within the widget can also be used by the windowing system (such as X windows).

-font => fontname

Sets the font in which the text is displayed.

-foreground =>color

Sets the color of the text.

-height => amount

Sets the height of the widget. Default is 24.

-highlightbackground =>color

Sets the color the highlight rectangle around the widget should be when it does not have the keyboard focus.

-highlightcolor =>color

Sets the color the highlight rectangle around the widget should be when it does have the keyboard focus.

-highlightthickness =>amount

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.
Start your free trial

You might also like

Mastering Perl/Tk

Mastering Perl/Tk

Stephen Lidie, Nancy Walsh

Publisher Resources

ISBN: 1565923146Supplemental ContentCatalog PageErrata