Topics List
Design Elements

TextBoxes
Managing Multi-line Text with Text Boxes

Text boxes are versatile elements used to display and edit multi-line text in apps. They provide users with a larger area to input or view text, making them ideal for tasks like composing messages, writing notes, or entering lengthy content. Text boxes can be customized with features like scrollbars, text wrapping, and text formatting options to enhance the user experience. They are essential for apps that require users to input or view substantial amounts of text, offering a convenient and user-friendly way to interact with the app“s content.



In the example included, textboxes are manipulated using the _Text() and _GetText() commands, just like textfields and labels. This uniformity in handling different types of UI elements simplifies coding and makes it more intuitive.
When setting text to a textbox, the _Text() command is used, followed by the textbox object and the desired text. For example, _Text(textbox_object, ''New text here'') will set the text of the specified textbox to ''New text here''.
Similarly, to retrieve the text from a textbox, the _GetText() command is used, passing the textbox object as an argument. This retrieves the current text content of the textbox.
The benefit of this approach is that developers can use consistent commands across various UI elements, reducing the need to remember and differentiate between different methods for different elements. This can lead to faster development and easier maintenance of the codebase.
You can download the project from the following link:

Class_Rar_0__25.rar

Textbox Properties


During design mode, you can assign the following properties and events to a Textbox:



Here is the list of properties and their usage for Textboxes:
  • name: The name of the TextBox.

  • Content

    • text: The initial text content of the TextBox.

  • Position and Size

    • x: The x-coordinate position of the TextBox.

    • y: The y-coordinate position of the TextBox.

    • const_anchorX: The x-anchor point of the TextBox.

    • const_anchorY: The y-anchor point of the TextBox.

    • width: The width of the TextBox.

    • height: The height of the TextBox.

    • toBack: Set to true to move the TextBox to the back layer.

    • toFront: Set to true to move the TextBox to the front layer.

  • Appearance

    • align: The horizontal alignment of the text within the TextBox (left, center, right).

    • isVisible: Set to true to make the TextBox visible.

    • font: The font style of the text.

    • fontsize: The font size of the text.

    • foreColor_RGB: The RGB color of the text foreground.

    • backColor_RGB: The RGB color of the TextBox background.

    • backAlpha: The alpha transparency of the TextBox background.

    • borderWidth: The width of the TextBox border.

    • borderColor_RGB: The RGB color of the TextBox border.

    • borderAlpha: The alpha transparency of the TextBox border.

    • isborderVisible: Set to true to make the TextBox border visible.

    • isbackColorVisible: Set to true to make the TextBox background color visible.

    • inputType: The type of input expected in the TextBox (default, number, decimal, phone, url, email, no-emoji).

    • isEditable: Set to true to make the TextBox editable.

  • Functions

    • editing: The function to execute when the TextBox is being edited.

    • submitted: The function to execute when editing is submitted.

    • began: The function to execute when editing begins.