My main app window has a tool bar.
Code: Select all
LOCAL nBtnSize := 40
LOCAL nBtwSpace := 1
LOCAL oStatTop := nil
LOCAL oTool := nil
DCSTATUSBAR oStatTop WIDTH nBtnSize HEIGHT nBtnSize ALIGN DCGUI_ALIGN_TOP TYPE XBPSTATIC_TYPE_TEXT EVAL {|o|o:SetColorBg(GRA_CLR_WHITE),o:SetColorFg(GRA_CLR_WHITE)}
@ 0,0 DCTOOLBAR oTool ALIGN TOOLBAR_TOP PIXEL BUTTONSIZE nBtnSize,nBtnSize SIZE (((nBtnSize + nBtnSpace) * 14)),nBtnSize FANCY EVAL {|o|o:SetColorBg(GRA_CLR_WHITE),o:SetColorFg(GRA_CLR_WHITE)} PARENT oStatTop
DCSETPARENT TO oTool
DCADDBUTTON TYPE XBPSTATIC_TYPE_TEXT SIZE nBtnSpace,nBtnSize
DCADDBUTTON CAPTION ICON_ABC_ADM ACTION {|| _StartBlock({||ReStartAdmin()})} TOOLTIP 'Een andere administratie openen'
DCADDBUTTON CAPTION ICON_BROWSE ACTION {|| _StartBlock({||Browse_Data()})} TOOLTIP 'Bekijken data'
DCADDBUTTON CAPTION ICON_INBOEKEN_ING ACTION {|| _StartBlock({||Start_Inboeken_Ing()})} TOOLTIP 'Inboeken ING'
DCADDBUTTON CAPTION ICON_INBOEKEN_RABO ACTION {|| _StartBlock({||Start_Inboeken_Rabo()})} TOOLTIP 'Inboeken Rabo'
etc.
- Removing buttons from the toolbar
- Adding buttons to the toolbar
How can i do this?
Regards,
Jack Duijf