Usina BRAdvPL Guide
Sign in
← All topics
COMMANDPublished

@ ... GET MULTILINE

@ <nRow>, <nCol> GET [<oMultiGet> VAR] <uVar> MULTILINE [OF <oWnd>] [SIZE <nWidth>, <nHeight>] [WHEN <cbWhen>] [VALID <cbValid>] [READONLY] [NOBORDER] [NO VSCROLL]

Creates a TMultiGet field for editing or displaying multiple lines of text.

Visual interfaceGETMultilineTMultiGetTextCommands
01 · OVERVIEW

Overview

The @ ... GET MULTILINE command creates a text area bound to a character variable. During compilation it is translated into the TMultiGet class New() constructor. By default, vertical scrolling is available when content exceeds the component height; it may also be read-only, borderless or created without vertical scrolling.

02 · SYNTAX

Syntax

@ <nRow>, <nCol> GET [<oMultiGet> VAR] <uVar> MULTILINE [OF <oWnd>] [SIZE <nWidth>, <nHeight>] [WHEN <cbWhen>] [VALID <cbValid>] [READONLY] [NOBORDER] [NO VSCROLL]

Parameters

nRow, nCol
NuméricoRequired

Row and column where the text area is placed. With PIXEL, coordinates start at the upper-left corner of the parent.

oMultiGet VAR
ObjetoOptional

Variable receiving the TMultiGet object. When supplied, VAR must precede the edited variable.

uVar
CaractereRequired

Character variable whose text is displayed and edited.

MULTILINE
CláusulaRequired

Selects the multiline control. TEXT and MEMO are accepted, but MULTILINE is recommended.

OF oWnd
ObjetoOptional

Dialog, panel, folder or other owner container. OF is recommended.

SIZE nWidth, nHeight
NuméricoOptional

Width and height of the text area.

WHEN cbWhen
LógicoOptional

Condition determining whether the component may receive focus.

VALID cbValid
LógicoOptional

Validation run when focus is lost; it must return .T. to allow leaving.

READONLY
CláusulaOptional

Allows selection and copying but prevents text changes.

NOBORDER / NO BORDER
CláusulaOptional

Creates the component without its standard visual border.

NO VSCROLL
CláusulaOptional

Disables vertical scrolling even when more lines exist than can be displayed.

COLOR · SIZE · FONT · PIXEL
CláusulasOptional

Customize colors, dimensions, font and coordinate system.

03 · PRACTICAL EXAMPLE

Editing multiline notes

#Include "TOTVS.ch"

User Function ExGetMultiline()
    Local oDlg
    Local oNotes
    Local cNotes := ""

    Define Dialog oDlg Title "Order notes" ;
        From 100, 100 To 380, 620 Pixel

    @ 15, 20 Get oNotes Var cNotes ;
        Multiline Size 250, 90 Of oDlg Pixel ;
        Valid Len(AllTrim(cNotes)) <= 500

    Activate Dialog oDlg Centered
Return
Expected result

The user may enter line breaks. VALID limits the content to 500 characters before allowing focus to leave.

04 · PRACTICAL EXAMPLE

Read-only informational text

#Include "TOTVS.ch"

User Function ExTextoLeitura()
    Local oDlg
    Local cTexto := "Orientações:" + CRLF + ;
        "1. Confira os dados." + CRLF + ;
        "2. Confirme o processamento."

    Define Dialog oDlg Title "Orientações" ;
        From 0, 0 To 260, 520 Pixel

    @ 15, 20 Get cTexto Multiline ReadOnly ;
        Size 220, 75 Of oDlg Pixel NOBORDER

    Activate Dialog oDlg Centered
Return
Expected result

READONLY preserves selection and copying; NOBORDER provides a more discreet presentation.

BEST PRACTICES
  • Include TOTVS.ch to make the command available to the compiler.
  • The edited variable must be character; use regular GET for numeric or date values.
  • Prefer MULTILINE over TEXT and MEMO for consistency.
  • The vertical scroll bar appears automatically when required.
  • Use READONLY for long text that users may select and copy.
  • Prefer OF to explicitly identify the owner container.
  • Official documentation notes that COLOR/COLORS support was added later; confirm AppServer and SmartClient versions in older environments.
COMMON PITFALLS
  • Without MULTILINE, TEXT or MEMO, the precompiler may generate a single-line TGet.
  • When an object is supplied, omitting VAR makes the declaration invalid.
  • NO VSCROLL may hide content that exceeds the available height.
  • VALID and WHEN must return logical values.
  • Without OF, the component is bound to the active window or dialog.
  • Very large text may require application-specific limits, persistence and handling.

Related content

REFERENCES
  1. TOTVS. @ ... GET MULTILINE. TDN. Created by Julio Wittwer; last changed on May 29, 2019.
  2. TOTVS. TMultiGet:New — constructor used by the command. TDN.
  3. eADVPL Reference Guide. No author identified, created July 28, 2005. Related section: p. 13–14. Historical reference; syntax checked primarily against a current source.
Status
Published
Page created on
Last reviewed on
Original language
Portuguese
Reviewed by
Usina.BR