nLinha / nColunaControl position.
AdvPL Guide@ <nLinha>, <nColuna> BUTTON <cTexto> SIZE <nLargura>, <nAltura> PIXEL OF <oObjetoRef> ACTION <expressao>Documents the @ ... BUTTON visual command on the TOTVS page.
Although the official title is BUTTON(), the documented syntax is an @ command with position, text, size, parent object and action. It is not a standalone Button() function. This variant uses BUTTON cText; the related historical site page documents a CAPTION variant that must not be mixed automatically. The example creates a dialog button whose action only records a choice and closes the window. (TOTVS, n.d., ref. 1)
@ <nLinha>, <nColuna> BUTTON <cTexto> SIZE <nLargura>, <nAltura> PIXEL OF <oObjetoRef> ACTION <expressao>nLinha / nColunaControl position.
cTextoButton text.
nLargura / nAlturaPixel dimensions.
oObjetoRefParent object.
expressaoAction on button activation.
Control-creation command; no documented confirmation return.
#Include "TOTVS.ch"
User Function EdButton()
Local oDlg
Local nChoice := 0
DEFINE DIALOG oDlg TITLE "Editorial test" FROM 0,0 TO 120,280 PIXEL
// Local action: no data write.
@ 20,20 BUTTON "Confirm" SIZE 80,20 PIXEL OF oDlg ACTION (nChoice := 1, oDlg:End())
ACTIVATE DIALOG oDlg CENTERED
ConOut(cValToChar(nChoice))
Return NilIf the button action runs, nChoice becomes 1; it starts at zero to distinguish closing without that action. 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.