Main   Class List   Namespace List   Online

GuiTextCtrl Class Reference
[Core Controls]

GUI control object this displays a single line of text, without TorqueML. More...

Inheritance diagram for GuiTextCtrl:
Inheritance graph
[legend]

List of all members.

Public Member Functions

void setText (string text)
 Sets the text in the control.
void setTextID (string textID)
 Maps the text ctrl to a variable used in localization, rather than raw text.

Public Attributes

int maxLength
 Defines the maximum length of the text. The default is 1024.
caseString text
 The text to show on the control.
string textID
 Maps the text of this control to a variable used in localization, rather than raw text.

Detailed Description

GUI control object this displays a single line of text, without TorqueML.

Example:
   new GuiTextCtrl()
   {
      text = "Hello World";
      textID = ""STR_HELLO"";
      maxlength = "1024";
       //Properties not specific to this control have been omitted from this example.
   };
See also:
GuiControl
Localization

Member Function Documentation

void GuiTextCtrl::setText ( string  text  ) 

Sets the text in the control.

Parameters:
text Text to display in the control.
Example:
// Set the text to show in the control
%text = "Gideon - Destroyer of World";

// Inform the GuiTextCtrl control to change its text to the defined value
%thisGuiTextCtrl.setText(%text);
See also:
GuiControl

Reimplemented in GuiTextEditCtrl, and GuiPopUpMenuCtrlEx.

void GuiTextCtrl::setTextID ( string  textID  ) 

Maps the text ctrl to a variable used in localization, rather than raw text.

Parameters:
textID Name of variable text should be mapped to
Example:
// Inform the GuiTextCtrl control of the textID to use
%thisGuiTextCtrl.setTextID("STR_QUIT");
See also:
GuiControl
Localization

Member Data Documentation

Defines the maximum length of the text. The default is 1024.

caseString GuiTextCtrl::text

The text to show on the control.

Maps the text of this control to a variable used in localization, rather than raw text.



Copyright © GarageGames, LLC. All Rights Reserved.