Prototype: GemRB.SetText (WindowIndex, ControlIndex, String Strref)
Metaclass Prototype: SetText (String Strref)

Description: Sets the Text of a control in a Window. In case of strrefs, any tokens contained by the string will be resolved. (For example the substring ‘' will be replaced by the 'CHARNAME' token.) -1 is a special Strref, it will be resolved to the name/version of the running engine.


  • WindowIndex, ControlIndex - the control’s reference
  • String - an arbitrary string
  • Strref - a string index from the dialog.tlk table.

Return value: 0 on success, -1 otherwise

See also: Control_QueryText, DisplayString, Window_GetControl, accessing_gui_controls

Back to function index, GUIScript introduction.