\fwh\samples\barlabel.prg
- Code: Select all Expand view RUN
#include "fivewin.ch"
function Main()
local oWnd, oBar, oBold
DEFINE WINDOW oWnd TITLE "FWH17.04 : ButtonBar Group Labels"
DEFINE BUTTONBAR oBar OF oWnd 2013 SIZE 56,56 HEIGHT 80
oBold := oBar:oFont:Bold()
oBar:oGrpFont := oBold
DEFINE BUTTON OF oBar FILE "\fwh\bitmaps\top.bmp" PROMPT "Top" GROUP LABEL "NAVIGATE"
DEFINE BUTTON OF oBar FILE "\fwh\bitmaps\16x16\goto.bmp" PROMPT "GoTo"
DEFINE BUTTON OF oBar FILE "\fwh\bitmaps\bottom.bmp" PROMPT "Bottom"
DEFINE BUTTON OF oBar FILE "\fwh\bitmaps\new2.bmp" PROMPT "Add" GROUP LABEL "EDIT"
DEFINE BUTTON OF oBar FILE "\fwh\bitmaps\edit.bmp" PROMPT "Edit"
DEFINE BUTTON OF oBar FILE "\fwh\bitmaps\16x16\delete0.bmp" PROMPT "Delete"
DEFINE BUTTON OF oBar FILE "\fwh\bitmaps\16x16\excel.bmp" PROMPT "Excel" GROUP LABEL "EXPORT"
DEFINE BUTTON OF oBar FILE "\fwh\bitmaps\16x16\pdf.bmp" PROMPT "PDF"
DEFINE BUTTON OF oBar FILE "\fwh\bitmaps\printquick16.bmp" PROMPT "Print"
DEFINE BUTTON OF oBar FILE "\fwh\bitmaps\16x16\exit2.bmp" PROMPT "Exit" GROUP
ACTIVATE WINDOW oWnd CENTERED
RELEASE FONT oBold
return nil
1) This feature works for buttonbars having styles 2007 and above as well as 3D with NOBORDER
2) While defining the Buttonbar HEIGHT clause also is to specified. The height should be greater than the height of the buttons to accommodate the height of the font.
3) Optionally, oBar:oGrpFont can be assigned with font to be used to paint the labels. The font is to be released by the programmer after the window is closed.
4) Group label is to be defined while defining first button of a group as in the above sample.