nRow, nColOrigin position in the units of the selected variant.
AdvPL Guide@ nRow, nCol COMBOBOX oCbx [VAR nVar] ITEMS aItems [SIZE nWidth, nHeight] OF oWndOffers a selection among known options.
The eAdvpl reference guide, §3.13, p. 15, records the historical variant shown in the syntax. Fragments assume the matching environment and command definitions; they are not a complete application. The historical variant uses a numeric VAR index and an ITEMS array. TComboBox also documents value binding and F4-related behavior; do not automatically apply that contract to the historical macro. Separate the visible label from the business identifier and validate the index before array access. (Refs. 1–2)
@ nRow, nCol COMBOBOX oCbx [VAR nVar] ITEMS aItems [SIZE nWidth, nHeight] OF oWndnRow, nColOrigin position in the units of the selected variant.
oWnd / oDlgExisting parent window; use the identifier from the actual code.
aItemsDisplayed options.
nVarSelection index in the historical variant; validate before indexing.
Interface/printing command; do not use as a function-return expression.
// Historical fragment; oDlg already exists.
Local oCbx
Local nOption := 1
Local aOptions := {"Open", "Completed"}
@ 2, 2 COMBOBOX oCbx VAR nOption ITEMS aOptions ;
SIZE 20, 1 OF oDlg
// Read nOption after interaction and validate 1..Len(aOptions).Proposed initial selection: first item. Reading after interaction requires window confirmation, which the fragment does not implement. 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.