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

7.2. Listbox Options

As with any of the widgets, you can configure the listbox using options. The standard widget options are -cursor, -font, -height, -highlightbackground, -highlightcolor, -highlightthickness, -takefocus, -width, -xscrollcommand, and -yscrollcommand. The options that behave the same for each widget will only be listed in the following list. Those options specific to listbox widgets will be discussed later in this chapter.

-background => color

Sets the color of the area behind the text.

-borderwidth => amount

Sets the width of the edges of the widget. Default is 2.

-cursor => cursorname

Sets the cursor to display when the mouse is over the listbox.

-exportselection => 0 |1

Determines if the current listbox selection is made available for the X selection as well. If set to 1, prevents two listboxes from both having selections at the same time.

-font => fontname

Sets the font of any text displayed within the listbox.

-foreground =>color

Sets the color of nonselected text displayed in the listbox.

-height => amount

Sets the height of the listbox.

-highlightbackground =>color

Sets the color the highlight rectangle should be when the listbox does not have the keyboard focus.

-highlightcolor =>color

Sets the color the highlight rectangle should be when the listbox does have the keyboard focus.

-highlightthickness =>amount

Sets the thickness of the highlight rectangle. Default is 2.

-relief => 'flat'|'groove'|'raised'|'ridge'|' sunken'|'solid'

Sets the relief ...

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