Index...
Centrallix Documentation
|
widget/editbox
editbox :: A visual widget which allows the entry of one line of textual data.
Metadata:
type: | widget/editbox |
visual: | yes |
container: | no |
form element: | yes |
Overview:
An editbox form element widget allows the display and data entry of a single line of text (or a numeric value). When the editbox is clicked (and thus receives keyboard focus), the user can type and erase data inside the widget. Data which does not fit will cause the text to scroll. When it receives keyboard focus, the editbox displays a flashing I-beam cursor. The cursor color uses the data focus color for the page (default is '#000080', or dark blue).
When an editbox is part of a form and the form goes into query mode the editbox has several additional features. First, you can use the * operator as a wildcard (e.g. *ber matches September, October, November, December). Second you can enter a range if the field is numeric (e.g. 1-100). Thirdly, a list of criteria can be specified, separated by commas.
Usage:
The editbox can be placed within any visual widget (or within a form widget). Editboxes automatically attach themselves to the form which contains them (whether directly or indirectly). Editboxes cannot contain visual widgets.
Properties:
Property | Type | Description |
fieldname |
string |
Name of the column in the datasource you want to reference. |
background |
string |
A background image for the contents of the editbox. |
bgcolor |
string |
A color, RGB or named, for the editbox contents. If neither bgcolor nor background is specified, the editbox is transparent. |
description_fgcolor |
string |
A color, RGB or named, editbox's value description. The value description is displayed to the right of the value in the editbox, in parentheses, and in a different color. |
empty_description |
string |
The value description to display in the editbox when the editbox is empty. For instance, "optional" or "required" or "type search and press ENTER" might be commonly used empty_description settings. |
height |
integer |
height, in pixels, of the editbox. |
maxchars |
integer |
number of characters to accept from the user. |
readonly |
yes/no |
set to 'yes' if the user cannot modify the value of the edit box (default 'no'). |
style |
string |
Either "raised" or "lowered", and determines the style of the border drawn around the editbox. Default is "lowered". |
tooltip |
string |
A string to display in a tooltip when the user rests the mouse pointer over the editbox. By default, the editbox will display a tooltip of its content if the content is too long to fit in the visible part of the editbox. |
width |
integer |
width, in pixels, of the editbox. |
x |
integer |
x-coordinate of the upper left corner of the editbox, default is 0. |
y |
integer |
y-coordinate of the upper left corner of the editbox, default is 0. |
Child Properties:
none currently available
Actions:
Action | Description |
SetValue |
The SetValue action modifies the contents of an editbox, and takes a single parameter, 'Value' (string). |
SetValueDescription |
This action modifies the "value description" of the editbox, and takes a single parameter, 'Description' (string). |
Events:
Event | Description |
Click |
This event occurs when the user clicks the widget. No parameters are available from this event. |
MouseUp |
This event occurs when the user releases the mouse button on the widget. |
MouseDown |
This event occurs when the user presses the mouse button on the widget. This differs from the 'Click' event in that the user must actually press and release the mouse button on the widget for a Click event to fire, whereas simply pressing the mouse button down will cause the MouseDown event to fire. |
MouseOver |
This event occurs when the user first moves the mouse pointer over the widget. It will not occur again until the user moves the mouse off of the widget and then back over it again. |
MouseOut |
This event occurs when the user moves the mouse pointer off of the widget. |
MouseMove |
This event occurs when the user moves the mouse pointer while it is over the widget. The event will repeatedly fire each time the pointer moves. |
DataChange |
This event occurs when the user has modified the data value of the widget (clicked or unclicked it). |
LoseFocus |
This event occurs when the editbox loses keyboard focus (if the user tabs off of it, for instance). |
GetFocus |
This event occurs when the editbox receives keyboard focus (if the user tabs on to it or clicks on it, for instance). |
Sample Code:
$Version=2$
// Here is a single lonely edit box.
my_editbox "widget/editbox"
{
x=180;
y=40;
width=120;
height=15;
style="lowered";
fieldname="datasource_fieldname";
bgcolor="#ffffff";
}
Comments...
(none yet)
Add a Comment...
|