nRow, nColOrigin position in the units of the selected variant.
AdvPL Guide@ nRow, nCol BUTTON oBtn CAPTION cCaption [SIZE nWidth, nHeight] [ACTION uAction] OF oWndCreates a button and binds its click action.
The eAdvpl reference guide, §3.10, p. 14, records the historical variant shown in the syntax. Fragments assume the matching environment and command definitions; they are not a complete application. In the historical variant, CAPTION supplies the label and OF identifies the window. TButton documentation also provides New/Create construction; examples using other includes may use PROMPT. Do not mix keywords from different variants. Execute the action when the event occurs, rather than calling it while constructing the screen. (Refs. 1–2)
@ nRow, nCol BUTTON oBtn CAPTION cCaption [SIZE nWidth, nHeight] [ACTION uAction] OF oWndnRow, nColOrigin position in the units of the selected variant.
oWnd / oDlgExisting parent window; use the identifier from the actual code.
cCaptionVisible button label.
Interface/printing command; do not use as a function-return expression.
// Historical eAdvpl fragment: oDlg must already exist.
Local oBtn
@ 2, 2 BUTTON oBtn CAPTION "Check" ;
SIZE 12, 1 ACTION Alert("Action requested") OF oDlgProposes a button displaying a message on click without writing data. Test ACTION expansion in the selected include. Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.
© 2026 Usina.BR. All rights reserved. TOTVS, Protheus, Microsiga and their respective logos are trademarks of their owners. AdvPL Guide is independent and uses limited, attributed excerpts justified by educational purposes. See the Terms of Use. Terms of Use
Comments
There are no approved comments yet.
Sign in with Google or Microsoft to comment.