Creation/Dev/Script/Client/GuiTextEditCtrl: Difference between revisions

From Graal Bible
mNo edit summary
 
No edit summary
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[Category:Scripting Reference]]
Inherits from [[Creation/Dev/Script/Client/GuiTextCtrl|GuiTextCtrl]].
=Description=
[[Image:Guicontrol_edit.png]]
This control displays text, a cursor and a box around it and lets you edit the text.
=Variables=
deniedsound - string
historysize - integer
password - boolean - replaces text with asterisks.
tabcomplete - boolean
=Functions=
setselection(int, int) - start, length
undo()
=Events=
onTabComplete() - the tab key has been pressed (when tabcomplete=true)
onAction(newtext) - the enter-key has been pressed
=Example=
<pre>
<pre>
      GuiTextEditCtrl (GuiTextCtrl):
new GuiTextEditCtrl("Test_Edit") {
        deniedsound - string
  profile = GuiBlueTextEditProfile;
        historysize - integer
  x = 10;
        password - boolean
  y = 10;
        tabcomplete - boolean
  width = 160;
        setselection(int, int)
  height = 20;
        undo()
  text = "Edit";
}
</pre>
</pre>

Latest revision as of 23:56, 15 February 2010

Inherits from GuiTextCtrl.

Description

Guicontrol edit.png

This control displays text, a cursor and a box around it and lets you edit the text.


Variables

deniedsound - string

historysize - integer

password - boolean - replaces text with asterisks.

tabcomplete - boolean


Functions

setselection(int, int) - start, length

undo()


Events

onTabComplete() - the tab key has been pressed (when tabcomplete=true)

onAction(newtext) - the enter-key has been pressed


Example

new GuiTextEditCtrl("Test_Edit") {
  profile = GuiBlueTextEditProfile;
  x = 10;
  y = 10;
  width = 160;
  height = 20;
  text = "Edit";
}