stringcontrol

Inherits

windowcontrol, textbasecontrol

Inherited By

stringfield

Context

windowinstance

Strings are controlled with stringcontrol objects.


Definition

<stringcontrol name="..." > <default > <text > ... </text> <textres > ... </textres> </default> <readonly /> <static > <text > ... </text> <textres > ... </textres> </static> <empty > <text > ... </text> <textres > ... </textres> <hidereadonly > ... </hidereadonly> </empty> <nodrag /> <nodrop /> <nodragselect /> <delaykeyupdate /> </stringcontrol>

<stringcontrol name="..." >

 

<default >

If present, new controls will use this value as their default, instead of the empty string. If no child tags or attributes defined, the enclosed text will be used.

<text > ... </text>

Text value to use when underlying database node initialized.

<textres > ... </textres>

String resource to use when underlying database node initialized.

</default>

 

<readonly />

Makes the string unmodifiable.

<static >

Makes the string unmodifiable, and the value on the control is set to the value specified. If no child tags or attributes defined, the enclosed text will be used.

<text > ... </text>

Text value to set this control to.

<textres > ... </textres>

String resource to set this control to.

</static>

 

<empty >

If the string is empty, the value of the empty tag is written in the field. If no child tags or attributes defined, the enclosed text will be used.

<text > ... </text>

Text value to use when the control is empty.

<textres > ... </textres>

String resource to use when the control is empty.

<hidereadonly > ... </hidereadonly>

Attribute. If exists, the empty text is not displayed when control set to read only status.

</empty>

 

<nodrag />

Disables drag operations originating from the string.

<nodrop />

Dropping strings in the field do not modify the value of the string.

<nodragselect />

Disables text selection by mouse dragging.

<delaykeyupdate />

If present and editing the value of this control using the keyboard, changes won't be written to the database and update event functions will not be called until the focus is moved away from the control.

</stringcontrol>

 


Interface

getEmptyText

function getEmptyText()

Retrieve the text to display in the control when the underlying data is the empty string.

Return values

(string)
The value of the empty text display string for this control.

onValueChanged

function onValueChanged()

Is called when the value of the string inside the control changes. This may result from finishing the editing of the string or the value changing externally from the control.



setEmptyText

Set the text to display in the control when the underlying data is the empty string.

Parameters

value   (string)   

The new value for the empty text display string