Creation/Dev/Script/Client/GuiTextCtrl: Difference between revisions
From Graal Bible
mNo edit summary |
Pooper200000 (talk | contribs) No edit summary |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
[[Category:Scripting Reference]] | |||
Inherits from [[Creation/Dev/Script/Client/GuiControl|GuiControl]]. | |||
=Description= | |||
[[Image:Guicontrol_text.png]] | |||
Simply displays some text. By using the variables ''textshadow'', ''shadowoffset'' and ''shadowcolor'' of the [[Creation/Dev/Script/Client/GuiControlProfile|profile]] you can improve the look. | |||
Note that GuiTextCtrl will only display one line of text. If you need to display more than one line, then use a [[Creation/Dev/Script/Client/GuiMLTextCtrl|GuiMLTextCtrl]]. | |||
=Variables= | |||
text - string | |||
=Functions= | |||
gettext() - returns string | |||
settext(str) | |||
=Events= | |||
onTextChanged(newtext) - the text has been modified | |||
=Example= | |||
<pre> | <pre> | ||
new GuiTextCtrl("Test_Text") { | |||
profile = GuiBlueTextProfile; | |||
x = 10; | |||
y = 10; | |||
height = 20; | |||
text = "Text"; | |||
} | |||
</pre> | </pre> |
Latest revision as of 23:56, 15 February 2010
Inherits from GuiControl.
Description
Simply displays some text. By using the variables textshadow, shadowoffset and shadowcolor of the profile you can improve the look.
Note that GuiTextCtrl will only display one line of text. If you need to display more than one line, then use a GuiMLTextCtrl.
Variables
text - string
Functions
gettext() - returns string
settext(str)
Events
onTextChanged(newtext) - the text has been modified
Example
new GuiTextCtrl("Test_Text") { profile = GuiBlueTextProfile; x = 10; y = 10; height = 20; text = "Text"; }