Centrallix - It's Different than what you Think
Home   |   Technology   |   Screen Shots   |   Download   |   Documentation   |   History   |   For Developers

Search...


Search For:

Index...


Centrallix Documentation
1. Getting Started
2. Applications Overview
3. Application Components
4. Reports Overview
5. Report Components
6. SQL Language
7. Process Modeling
8. Application Modeling
9. Role-Based Security
10. Business Logic Modeling
11. Other Objects
12. External API's
13. Internal API's

widget/dropdown


dropdown :: A visual widget which allows the user to select one from a number of options in a list which appears when the user clicks on the widget.

Metadata:
type:widget/dropdown
visual: yes
container: no
form element: yes


Overview:

A dropdown form element widget that allows one of several options to be selected in a visual manner. The options are filled in using one of the child widgets, or via an SQL query to a database defined below.


Usage:

This widget can be placed within any visual widget (or within a form widget). It may only contain 'dropdownitem' child objects, although it may of course also contain connectors as needed.


Properties:

PropertyTypeDescription
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.
width integer width, in pixels, of the editbox.
highlight integer The color of the highlighted option when the mouse goes over the item.
bgcolor integer The background color for the widget.
fieldname string Fieldname (from the dataset) to bind this element to
mode string If this is set to objectsource then the dropdown acts an objectsource client.
sql string The SQL used to retrieve the list of items for the dropdown. It should have between two and five columns, in this order: label, value, selected (0 or 1, whether the item is selected by default), grp (group name), hidden (0 or 1 to hide the item from the dropdown list but still allow it to be a valid value).
query_multiselect yes/no If set to yes, this indicates that when the dropdown's form is in search (QBF) mode, the dropdown will allow multiple items to be selected, so the user can search for records/objects that match one of several values. The values will be listed in the dropdown, separated by commas.


Child Properties:

(of widget/dropdownitem child widgets)

PropertyTypeDescription
label string The text label to appear in the dropdown listing.
value string The actual data that is stored with this item.


Actions:

ActionDescription
SetItems This specifies a SQL (use "SQL" parameter) query to use to re-load the contents of the dropdown. It should have between two and five columns, in this order: label, value, selected (0 or 1, whether the item is selected by default), grp (group name), hidden (0 or 1 to hide the item from the dropdown list but still allow it to be a valid value).
SetGroup This causes the dropdown to display a different Group of items (use the Group parameter). It can also restrict what items are displayed based on a minimum or maximum value (use Min and Max parameters).


Events:

EventDescription
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 edit bar of the dropdown loses keyboard focus (if the user tabs off of it, for instance).
GetFocus This event occurs when the edit bar receives keyboard focus (if the user tabs on to it or clicks on it, for instance).


Sample Code:

$Version=2$
// Example using child widgets for options
myDropDown1 "widget/dropdown"
	{
	x=10;
	y=10;
	width=120;
	bgcolor="#dcdcdc";
	highlight="#c0c0c0";
	fieldname="gender";
	myDropDownChild1 "widget/dropdownitem"
		{
		label="Male";
		value="0";
		}
	myDropDownChild2 "widget/dropdownitem"
		{
		label="Female";
		value="1";
		}
	}
$Version=2$
//  Example getting options from datasource using a query
myDropDown2 "widget/dropdown"
	{
	x=10;
	y=10;
	width=120;
	bgcolor="#dcdcdc";
	highlight="#c0c0c0";
	fieldname="gender";
	sql="SELECT :gender_label, :gender_value FROM /my_DB/infotable/rows";
	}




Comments...


(none yet)

Add a Comment...


Your Name:
Comment:


(c) 2001-2020 LightSys Technology Services, Inc. All trademarks are property of their respective owners.

Project Hosting Provided By:
Hosted by Sourceforge