ToolBar
ToolBar Methods
ToolBar() | Constructor for the ToolBar class |
SetImageSize() | Sets the size of images used for tool bar item icons |
AddSeparator() | Virtual method to add a separator to the tool bar |
NumSeparators() | Virtual method to return number of separators in the tool bar |
NumItems() | Virtual method to return number of "menu items" attached to the tool bar |
Derived Classes
None
See Also
Class Hierarchy, Dialog, Frame, MenuBar, ToolBarItem
public method ToolBar(Window Parent)
Parameters
Parent
Parent window of the tool bar
Return Value
None
Description
Constructor for the ToolBar class. The parent must be specified, and it must be a Dialog, Frame or ParentFrame window type (or derived from one of those).
ToolBar Class
public method SetImageSize(int Width, int Height)
Parameters
Width
Width of the images in pixels
Height
Height of the images in pixels
Return Value
None
Description
This method sets the image size for all of the tool bar items in the tool bar (e.g. 16,16 or 32,32).
ToolBar Class
public virtual method<int> AddSeparator(int Index = 0)
Parameters
Index
Will be added before the one based index. Zero means add to end.
Return Value
One based index where separator was added
Description
This virtual method adds a separator to the tool bar. The specified index is one based, and the separator gets added before that index. If the index is zero (default), the separator gets added to the end.
ToolBar Class
public virtual method<int> NumSeparators()
Parameters
None
Return Value
Number of separators in the tool bar
Description
This virtual method returns the number of separators which have been added to the tool bar.
ToolBar Class
public virtual method<int> NumItems()
Parameters
None
Return Value
Number of "ToolBarItem" objects attached to tool bar
Description
This virtual method returns the number of "ToolBarItem" objects which are attached to this tool bar object. It does not include separators.
ToolBar Class
public virtual method<SelectItem> GetItem(int Index)
Parameters
Index
One based index for the item
Return Value
Reference to ToolBarItem object or null
Description
This virtual method returns a reference to the ToolBarItem object associated with the specified one based index. If the index refers to a separator (or if the index is not valid), a null will be returned. A valid index will be in the range from one to the total of (separators + items).
This ToolBar implementation of this method will return a ToolBarItem reference.
ToolBar Class