The Toolbar Object

Synopsis

Class Name: Toolbar
Valid Parents: Bulletin, Dialog, Panel
Valid Children: Icon, Separator, Combobox

Description

A container for Icons.

  • The Panel object can have up to two toolbar children. See Panel
  • A Dialog can have one toolbar child
  • A Bulletin object (and bulletinBoard dialog type) can have any number of Toolbar children.

Inherited Resources

New Resources

Name
Type
Default
XuNguiSpacing
float
5
  • Defines the distance in pixels between icons on the toolbar.
  • This resource has no effect under Windows.

Example Code - simple.gsa

  create Toolbar gsharp_1.toptoolbar
   ( XuNguiCreateFunction = "GuiSetCommandToolbarId",
     XuNguiDestroyFunction = "GuiDestroyCommandToolbar"
   );
  create Icon gsharp_1.toptoolbar.open
   ( XuNguiLabel = "Open",
     XuNguiCallback = "GuiFileOpen",
     XuNguiPixmap = "open.xpm"
   );
  create Icon gsharp_1.toptoolbar.save
   ( XuNguiLabel = "Save",
     XuNguiCallback = "GuiFileSave",
     XuNguiPixmap = "save.xpm"
   );
  create Icon gsharp_1.toptoolbar.print
   ( XuNguiLabel = "Print",
     XuNguiCallback = "GuiFilePrint",
     XuNguiPixmap = "print.xpm"
   );
  create Separator gsharp_1.toptoolbar.sep;
  create Combobox gsharp_1.toptoolbar.speed
   ( XuNguiListItems = "'Quick'//'Very Quick'//'Lightning'"
   );

  create Canvas gsharp_1.scrolledcanvas;

Return to Gsharp Applications Reference Manual