Back: BLOX.BDropDown-widget protocol Up: BLOX package Forward: BLOX.BDropDownEdit-accessing   Top: GNU Smalltalk Library Reference Contents: Table of Contents Index: Class index About: About this document

1.13 BLOX.BDropDownEdit

Defined in namespace BLOX
Superclass: BLOX.BDropDown
Category: Graphics-Examples
This class resembles an edit widget, but it has an arrow button that allows the user to pick an item from a pre-built list.

1.13.1 BLOX.BDropDownEdit: accessing  (instance)
1.13.2 BLOX.BDropDownEdit: accessing-overrides  (instance)
1.13.3 BLOX.BDropDownEdit: text accessing  (instance)


1.13.1 BLOX.BDropDownEdit: accessing

backgroundColor: aColor
Set the value of the backgroundColor option for the widget.

Specifies the normal background color to use when displaying the widget.

font: aString
Set the value of the font option for the widget.

Specifies the font to use when drawing text inside the widget. The font can be given as either an X font name or a Blox font description string.

X font names are given as many fields, each led by a minus, and each of which can be replaced by an * to indicate a default value is ok: foundry, family, weight, slant, setwidth, addstyle, pixel size, point size (the same as pixel size for historical reasons), horizontal resolution, vertical resolution, spacing, width, charset and character encoding.

Blox font description strings have three fields, which must be separated by a space and of which only the first is mandatory: the font family, the font size in points (or in pixels if a negative value is supplied), and a number of styles separated by a space (valid styles are normal, bold, italic, underline and overstrike). Examples of valid fonts are "Helvetica 10 Bold", "Times -14", "Futura Bold Underline". You must enclose the font family in braces if it is made of two or more words.

foregroundColor: aColor
Set the value of the foregroundColor option for the widget.

Specifies the normal foreground color to use when displaying the widget.

highlightBackground: aColor
Set the value of the highlightBackground option for the widget.

Specifies the background color to use when displaying selected items in the list widget and the selection in the text widget.

highlightForeground: aColor
Set the value of the highlightBackground option for the widget.

Specifies the background color to use when displaying selected items in the list widget and the selection in the text widget.


1.13.2 BLOX.BDropDownEdit: accessing-overrides

text
Answer the text shown in the widget


1.13.3 BLOX.BDropDownEdit: text accessing

insertAtEnd: aString
Clear the selection and append aString at the end of the text widget.

replaceSelection: aString
Insert aString in the text widget at the current insertion point, replacing the currently selected text (if any), and leaving the text selected.

selectAll
Select the whole contents of the text widget

selectFrom: first to: last
Sets the selection of the text widget to include the characters starting with the one indexed by first (the very first character in the widget having index 1) and ending with the one just before last. If last refers to the same character as first or an earlier one, then the text widget's selection is cleared.

selection
Answer an empty string if the text widget has no selection, else answer the currently selected text

selectionRange
Answer nil if the text widget has no selection, else answer an Interval object whose first item is the index of the first character in the selection, and whose last item is the index of the character just after the last one in the selection.

text: aString
Set the contents of the text widget and select them.



Back: BLOX.BDropDownEdit-accessing-overrides Up: BLOX.BDropDownEdit Forward: BLOX.BDropDownList   Top: GNU Smalltalk Library Reference Contents: Table of Contents Index: Class index About: About this document


This document was generated on August, 19 2010 using texi2html