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
getText
setColor
setFont
setMaxWidth
setText



Inherits widget
Context widgetcontainer

A text widget is a specialized version of widget.

Text widgets contain a text string, rendered in the given font. The size of the widget will vary based on the text content, and can be limited to a maximum width.



Interface

getText

function getText( )

Retrieve the text string displayed in the widget.

Return values

(string)
Returns the text displayed in the widget

setColor

function setColor( color )

Sets the color used when rendering the contents of the control. This setting overrides the color defined in the font used. To restore the use of font resource color, specify nil as the parameter value.

The specified parameter is a color value in a HTML-style string representation, in the format "#AARRGGBB". The components are hexadecimal digits specifying the value of the alpha (transparency), red, green and blue channels, respectively, in the range 0 .. 255. If alpha is zero or not defined, FF is assumed.

Parameters

color(string)
The color to be used, or nil to reset the setting. See above for details on the string format.

setFont

function setFont( name )

Sets the font resource used for rendering the text in the widget.

Parameters

name(string)
The name of the font resource

setMaxWidth

function setMaxWidth( width )

Set the maximum width of the widget. If the maximum width is set and the text contained in the widget is longer than allowed, an ellipsis ('...') will be placed at the end of the displayed string.

Parameters

width(number)
The maximum width of the widget in pixels. To disable the maximum width setting, set the value to 0.

setText

function setText( text )

Set the text string displayed in the widget.

Parameters

text(string)
Text displayed in the widget


'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