DEFINE TOOLBAR

Creates a ToolBar Control

Standard Syntax (xBase Style):

DEFINE TOOLBAR <ControlName>
   [ OF | PARENT <ParentWindowName> ]
   [ BUTTONSIZE <nWidth> , <nHeight> ]
   [ IMAGESIZE <nWidth> , <nHeight> ]
   [ STRICTWIDTH ]
   [ FONT <cFontName> ]
   [ SIZE <nFontSize> ]
   [ BOLD ]
   [ ITALIC ]
   [ UNDERLINE ]
   [ STRIKEOUT ]
   [ TOOLTIP <cTooltipText> ]
   [ FLAT ]
   [ BOTTOM ]
   [ RIGHTTEXT ]
   [ GRIPPERTEXT ]
   [ BORDER ]
   [ BREAK ]

   BUTTON <Controlname>
      [ CAPTION <cCaption> ]
      [ PICTURE <cPictureName> ]
      [ ACTION | ON CLICK | ONCLICK <ActionProcedureName> | <bBlock> ]
      [ TOOLTIP <cToolTipText> ]
      [ SEPARATOR ]
      [ AUTOSIZE ]
      [ DROPDOWN ]
      [ WHOLEDROPDOWN ]
      [ CHECK ]
      [ GROUP ]
      [ NOTRANSPARENT ]
 ...
 END TOOLBAR

Alternate Syntax:

DEFINE TOOLBAR <ControlName>
   [ PARENT <ParentWindowName> ]
   [ BUTTONWIDTH <nWidth> ]
   [ BUTTONHEIGHT <nHeight> ]
   [ IMAGEWIDTH <nWidth> ]
   [ IMAGEHEIGHT <nHeight> ]
   [ STRICTWIDTH [lValue] ]
   [ FONTNAME <cFontName> ]
   [ FONTSIZE <nFontSize> ]
   [ FONTBOLD <lValue> ]
   [ FONTITALIC <lValue> ]
   [ FONTUNDERLINE <lValue> ]
   [ FONTSTRIKEOUT <lValue> ]
   [ TOOLTIP <cTooltipText> ]
   [ FLAT <lValue> ]
   [ BOTTOM <lValue> ]
   [ RIGHTTEXT <lValue> ]
   [ GRIPPERTEXT <lValue> ]
   [ BORDER <lValue> ]
   [ BREAK <lValue> ]

   TOOLBUTTON <Controlname>
      [ CAPTION <cCaption> ]
      [ PICTURE <cPictureName> ]
      [ ONCLICK <ActionProcedureName> | <bBlock> ]
      [ TOOLTIP <cToolTipText> ]
      [ SEPARATOR <lValue> ]
      [ AUTOSIZE <lValue> ]
      [ DROPDOWN <lValue> ]
      [ WHOLEDROPDOWN <lValue> ]
      [ CHECK <lValue> ]
      [ GROUP <lValue> ]
      [ NOTRANSPARENT <lValue> ]
    ...
END TOOLBAR

ToolBar Properties:

ToolBar Button Properties:

D: Available at control definition only

ToolBar Button Events:

  • OnClick

Hints:

  • GRIPPERTEXT Property works only for toolbars defined inside splitbox.
  • "Action" and "WholeDropDown" clauses can't be used simultaneously
  • Since ToolBar is a container, you can specify when refer to properties or events of its child buttons, ie:
    Win1.ToolBar1.Button1.Enabled := .F.
    

results matching ""

    No results matching ""