Basic interface with dialogs, SAY, GET and buttons
DEFINE MSDIALOG → @ SAY / GET / BUTTON → ACTIVATE MSDIALOGBuilds a simple screen without coupling editing to persistence.
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.)
Syntax
DEFINE MSDIALOG → @ SAY / GET / BUTTON → ACTIVATE MSDIALOGCommented 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 NilIn-memory editable screen with explicit closure. Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.
- 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.

Comments
There are no approved comments yet.
Sign in with Google or Microsoft to comment.