Copyright © 2009 Arndt Roger Schneider
The RTL based option creator is used
to instantiate the template rtl_combobox with a
Tk Window. The used creator window must have a
-class
property.
Acceptable Tk Windows are: toplevel for floating windows, and frame for embedded windows.
See the options manual entry for details on the standard options.
Specifies a Tcl command to associate with the button to the right. This command is invoked when mouse button 1 is released over the button window.
Color, defines the background color for the entry to the left.
Specifies a Tcl command to associate with the pop-up listbox. The selectcommand is invoked, when an item is selected in the listbox.
Where the pop-up will appear in relation to the combobox. Possible values are »above« and »below«. Default value is »below«.
Integer dimension. The height in rows of the contained listbox window.
the maximum amount of listbox entries. The default value is »-1«, meaning unlimited.
Integer dimension. The width in characters of the contained listbox.
The internal listbox. The kind of the internal listbox can be defined prior creation. listType is a static property.
The used list must conform to the Tk listbox interface.
Rtl_mlistbox, hugelist or listbox can be used.
Specifies one of three states for the button: normal, active, or disabled. In normal state the button is displayed using the foreground and background options. The active state is typically used when the pointer is over the button. In active state the button is displayed using the activeForeground and activeBackground options. Disabled state means that the button should be insensitive: the default bindings will refuse to activate the widget and will ignore mouse button presses. In this state the disabledForeground and background options determine how the button is displayed.
The »rtl_combobox« command creates a »rtl_combobox« window.
»rtl_combobox« is a ComboBox window as known from Microsoft® Windows®. The popup listbox type –inside »rtl_combobox«– can be predefined via the »-listtype« property. Any window, conforming to the »listbox« interface can be used inside the »rtl_combobox«; including »rtl_mlistbox«, »hugelist«, »listbox«.
Revision : 01/01/2009, Roger Clearing some settings in respect to Hugelist. The histheight is set to 0, allowing it to be set to 5 in any case. See also : gstripesrtl.tcl for further additions concerning rtl_combobox.
RTL 2.0 minor cosmetic change: The button inside will respond to -relief and highlightbackground features the background of the entry. Ported from DOS to unicode/unix.
Open Issue: Aqua grab doesn’t quite work.
Note 05/24/2008 - 09:29 : Images are still troublesome. Partly because of Tk, defining the width for the button is differently interpreted for text and images. This means 15p is allowed for an image, but not for text! Width is as such differently interpreted. In addition ptext doesn’t deal with u2517 properly under OSX/X11 ... doesn’t work and thus no cross-platform solution can be applied. The image bitmap stuff should be erased entirely. And instead u25BC and u25B2 being used –as intended originally.
A Window created through the rtl_combobox command exposes various functions. Using these functions has the following general form:
(option object ?arg arg ...?)
PathName is the same as the window path name. Option and the args determine the exact behavior of the command. The following commands are possible for this window:
Returns the current value of the configuration option given by option. Option may have any of the values accepted by the rtl_combobox command.
Query or modify the configuration options of the window. If no option is specified, returns a list describing all of the available options for pathName (see Tk_ConfigureInfo for information on the format of this list). If option is specified with no value, then the command returns a list describing the one named option (this list will be identical to the corresponding sublist of the value returned if no option is specified). If one or more option-value pairs are specified, then the command modifies the given window option(s) to have the given value(s); in this case the command returns an empty string. Option may have any of the values accepted by the rtl_combobox command.
Delete string range from the entryfield
Insert an item to the history list
Set the entryfield completely.
Popup a listbox, if the button is pressed
Invoked when return is pressed in the entryfield
Insert an string at the given position in the entryfield
Get history item at given position
Search for the given token inside the history list and set the associated entry to that item.
Clear the history list. Side-effect clear the contained listboxes while this listbox exists. Revision : 01/01/2009, Roger–Simplified