Skip to content
Morgan Willcock edited this page Oct 9, 2019 · 22 revisions

TextBox functions and properties

TextBox is a subclass of GUIControl and therefore inherits all GUIControl's functions and properties in addition to its own, which are listed below.


TextBox.Font

(Formerly known as SetTextBoxFont, which is now obsolete)

FontType TextBox.Font

Gets/sets the font used by the specified text box. This might be useful if you need a player input text box to use a different font with foreign language translations, for example.

Example:

txtUserInput.Font = eFontNormal;

will change the txtUserInput text box to use Font "Normal".

See Also: Label.Font, TextBox.Text


TextBox.ShowBorder

bool TextBox.ShowBorder

Gets/sets whether the text box's border is shown.

Border is drawn using color from TextColor property.

Compatibility: Supported by AGS 3.5.0 and later versions.


TextBox.Text

(Formerly known as GetTextBoxText, which is now obsolete)
(Formerly known as SetTextBoxText, which is now obsolete)
(Formerly known as TextBox.GetText, which is now obsolete)
(Formerly known as TextBox.SetText, which is now obsolete)

String TextBox.Text;

Gets/sets the text box contents. This might be useful to reset the text box to blank after the user has typed something in, or to fill in a default value.

Example:

txtUserInput.Text = "";

will clear the txtUserInput text box.

See Also: TextBox.Font, String.CompareTo, Label.Text


TextBox.TextColor

int TextBox.TextColor;

Gets/sets the text color used to draw the text box. This affects both the text in the text box, and also the text box's border.

Example:

txtInput.TextColor = 14;

will change text box 'txtInput' to have yellow text.

Compatibility: Supported by AGS 3.1.0 and later versions.

See Also: TextBox.ShowBorder, TextBox.Text

Getting Started in AGS

Introduction

Frequently Asked Questions

Tutorial

Editor Reference

Room Editor

Character Editor

GUI Editor

Sprite Manager

View Editor

Inventory Items Editor

Other Features

Engine

The run-time engine

Graphics driver selection

Engine Setup Program

Scripting

Scripting Language

Scripting API

Reference

Working on Legacy games

Upgrading from a previous version

Legal Notice

Copyright and terms of use

Anonymous usage information

Credits

Getting in touch

Contacting the developers

Clone this wiki locally