SButton
SButton():New(nRow,nCol,nType,bAction,oParent,.T.)Creates an SButton in a visual container.
Overview
The SBUTTON() queue item is the SButton class derived from TControl. TDN shows New with position, type, action and parent; appearance depends on theme. The example uses type 1 as in the source without assigning an undocumented meaning, and passes the dialog explicitly. This page covers only that constructor subset; the consulted page does not specify a formal list of own properties/methods. We do not infer them from the base class. (Sources: refs. 1–2.)
Syntax
SButton():New(nRow,nCol,nType,bAction,oParent,.T.)Methods
NewConstructor demonstrated by the official page; subset does not cover every overload.SButton():New(nRow,nCol,nType,bAction,oParent,.T.)
Created button object.
Return value
SButton object from the constructor.
Commented example
#Include "Protheus.ch"
User Function Ed641()
Local oDlg
Local oButton
// Fifth argument supplies the parent without relying on active-window state.
DEFINE DIALOG oDlg TITLE "SButton example" FROM 0,0 TO 150,350 PIXEL
oButton := SButton():New(12,12,1,{|| oDlg:End()},oDlg,.T.)
ACTIVATE DIALOG oDlg CENTERED
Return NilOn a compatible client creates a button that closes the dialog, without data changes. Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.
- Requires graphical UI. Argument six retains .T. from the official example; additional options/type mappings need release documentation.
- 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.