Packages
Comm
DB
Debug
Input
Interface
Module
Token
User

Objects
bitmapwidget
databasenode
dragdata
textwidget
tokeninstance
widget
widgetcontainer

Elements
buttoncontrol
categoryselectioncontrol
chatentry
chatwindow
databasecontrol
diecontrol
diefield
formattedtextcontrol
formattedtextfield
genericcontrol
imagecontrol
numbercontrol
numberfield
portraitselectioncontrol
script
scrollbarcontrol
scrollercontrol
stringcontrol
stringfield
subwindow
textbasecontrol
tokenbag
tokencontrol
tokenfield
windowclass
windowcontrol
windowinstance
windowlist
windowreferencecontrol
windowreferencefield

Components
categoryselectionsettings
customdie
desktopframe
die
distance
font
framedef
hotkeybar
icon
imageupdatefolder
importinfo
includefile
panel
portraitset
properties
replaces
template
tokenroot
tooltip
hasFocus
isReadOnly
onGainFocus
onLoseFocus
onTab
onValueChanged
setFocus
setReadOnly



Inherits windowcontrol textbasecontrol
Context windowinstance

Strings are controlled with stringcontrol objects.



Definition

<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.
</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

hasFocus

function hasFocus( )

Checks if the control has the keyboard focus.

Return values

(boolean)
Returns true if the control has focus and false if it does not.

isReadOnly

function isReadOnly( )

Checks if the control is flagged as read only. This setting corresponds with the "static" definition parameter.

Return values

(boolean)
Returns true if the control has the read only flag set, false otherwise

onGainFocus

event function onGainFocus( )

Is called when the control gains the keyboard focus.


onLoseFocus

event function onLoseFocus( )

Is called when the control loses the keyboard focus.


onTab

event function onTab( forward )

If present, this function is executed whenever the user presses the tab key when editing the text. This method can be used to support list or table like operation for controls. If the shift key is pressed as well, the parameter will be false

Parameters

forward(boolean)
If the tab key is pressed without the shift key being depressed, the value is true, indicating a forward tab operation. If the shift key is depressed, the value is false indicating a backward tab operation.

onValueChanged

event 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.


setFocus

function setFocus( [state] )

This function requests the framework to either set or reset the keyboard focus to this control.

Parameters

state(boolean)[optional]
A value of true sets the focus to this control, a false value resets the focus. When the parameter is omitted (synonymous to passing a nil value), the value is treated as true.

setReadOnly

function setReadOnly( state )

Sets the read only flag of the control.

Parameters

state(boolean)
A value of true sets the read only flag and a value of false disables it.


'Fantasy Grounds' is a trademark of SmiteWorks Ltd. All other trademarks are the property of their respective owners.
2004-2010 SmiteWorks Ltd. ALL RIGHTS RESERVED.
Privacy policy