Usina BRAdvPL Guide
Sign in
← All topics
PRACTICAL GUIDEUnder review

Basic interface with dialogs, SAY, GET and buttons

DEFINE MSDIALOG → @ SAY / GET / BUTTON → ACTIVATE MSDIALOG

Builds a simple screen without coupling editing to persistence.

Basic interface with dialogs, SAY, GET and buttonsAdvPL
01 · OVERVIEW

Overview

The example creates MSDialog, a SAY label, a GET bound to a local variable and a close button. GET content updates on focus loss; validate actual editing state before real operations. Closing the dialog does not confirm or save data. Coordinates are illustrative pixels. (Sources: refs. 1–4.)

02 · SYNTAX

Syntax

DEFINE MSDIALOG → @ SAY / GET / BUTTON → ACTIVATE MSDIALOG
03 · PRACTICAL EXAMPLE

Commented example

#Include "Protheus.ch"

User Function Ed492()
    Local oDlg,oSay,oGet,oBtn
    Local cText := Space(20)
    DEFINE MSDIALOG oDlg TITLE "Test screen" FROM 0,0 TO 160,360 PIXEL
    @ 12,12 SAY oSay PROMPT "Text:" SIZE 50,10 OF oDlg PIXEL
    @ 12,65 GET oGet VAR cText SIZE 100,12 OF oDlg PIXEL
    // Only closes the window; no data persistence.
    @ 45,65 BUTTON oBtn PROMPT "Close" SIZE 55,15 OF oDlg PIXEL ACTION oDlg:End()
    ACTIVATE MSDIALOG oDlg CENTERED
Return Nil
Expected result

In-memory editable screen with explicit closure. Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

BEST PRACTICES
  • Check command expansion in release includes and test keyboard navigation and closure.
  • Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

Related content

REFERENCES
  1. TOTVS. MSDIALOG(). TDN. Accessed on 2026-10-27.
  2. TOTVS. TGet. TDN. Accessed on 2026-10-27.
  3. TOTVS. TSay. TDN. Accessed on 2026-10-27.
  4. TOTVS. TButton. TDN. Accessed on 2026-10-27.
Status
Under review
Page created on
Last reviewed on
Original language
Portuguese
Reviewed by
Usina.BR
0 approved comment(s)

Comments

There are no approved comments yet.

Sign in with Google or Microsoft to comment.

Powered by Usina Docs · Alpha