Already found out.
Using the SUBCLASS directive
Code: Select all
DCSTATUSBAR oStat WIDTH TB_BAR_WIDTH ALIGN DCGUI_ALIGN_LEFT ;
      TYPE XBPSTATIC_TYPE_TEXT;
      PARENT oDlg ;
      SUBCLASS "SN_STATUSBAR()"
Then add a button and store the Dc_XbpPushbutton object is a getset function FullScreenButton()
Code: Select all
@ nPos,  10 DCPUSHBUTTON CAPTION ICON_FULLSCREEN SIZE 30,30 PIXEL ACTION {||Toggle_FullScreen()} PARENT oStat EVAL {|o|FullScreenButton(o)} WHEN {||TRUE} FANCY
Whenever the dialog and toolbar is resized, the button fixed to the bottom of the toolbar.
Code: Select all
CLASS SN_STATUSBAR FROM  DC_XbpStatusBar
EXPORTED
METHOD      Create
METHOD      ShowButton
ENDCLASS
METHOD SN_STATUSBAR:Create( oParent, oOwner, aPos, aSize, aPres, lVisible )
LOCAL bResize        := nil
::DC_XbpStatusBar:Create( oParent, oOwner, aPos, aSize, aPres, lVisible )
bResize              := ::Resize
If ValType(::Resize) = "B"
   ::Resize          := {||Eval(bResize),::ShowButton()}
Else
   ::Resize          := {||::Showbutton()}
Endif
Return SELF
METHOD  SN_STATUSBAR:ShowButton()
LOCAL oButton        := FullScreenButton()
If ValType(oButton) = "O"
   oButton:SetPos({5,5})
Endif
Return
Regards,
Jack Duijf