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
 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 > ... </default> If present, new controls will use this value as their default, instead of the empty string.
<readonly /> Makes the string unmodifiable.
<static > ... </static> Makes the string unmodifiable, and the value on the control is set to the value specified.
<empty > ... </empty> If the string is empty, the value of the empty tag is written in the field.
<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.
</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