int Toolbar_New (int parentPanel, int menuBar, const char *title, int top, int left, int conformBitmapColors, int conformToSystem, ToolbarType *newToolbar);
Creates a new toolbar.
Input | ||
Name | Type | Description |
parentPanel | integer | The handle of the panel on which to place the new toolbar. Obtain this handle from the LoadPanel, NewPanel, or DuplicatePanel functions. If you pass 0, the toolbar is created as a floating toolbar. To attach the toolbar programmatically, call Toolbar_Attach. A user also can attach the toolbar to any panel that you have specified as a dock point with Toolbar_AddDockPoint. |
menuBar | integer | The menu bar to associate with the toolbar. Associate a menu bar when you want to use your existing menu callbacks for toolbar callbacks as well. For example, if you had an Open File menu item in your panel menu bar, and you wanted to create a toolbar button that also performed Open File, you would specify your panel menu bar in Toolbar_New and the open file menu item in Toolbar_InsertItem. You can use GetPanelMenuBar to get the current menu bar handle for your panel. |
title | const char * | The title for the new toolbar. The title appears in the toolbar title bar when the toolbar is undocked. LabWindows/CVI also uses the title to identify the toolbar when you call the Toolbar_SaveStates and Toolbar_LoadStates functions. |
top | integer | The vertical coordinate at which the upper left corner of the toolbar is placed. The coordinate must be an integer value from top applies to all toolbars on the panel if parentPanel is nonzero. If parentPanel is zero, this parameter is a global coordinate. Pass 0 to allow LabWindows/CVI to place the toolbar in an appropriate location. |
left | integer | The horizontal coordinate at which the upper left corner of the toolbar is placed. The coordinate must be an integer value from left applies to all toolbars on the panel if parentPanel is nonzero. If parentPanel is zero, this parameter is a global coordinate. Pass 0 to allow LabWindows/CVI to place the toolbar in an appropriate location. |
conformBitmapColors | integer | Specify Yes (1) for this parameter if you want the bitmaps on your toolbar buttons to conform to the color scheme of the toolbar. Specify No (0) if you want the bitmaps to appear on the toolbar buttons without modification. To conform your toolbar button bitmaps properly, your bitmaps should use VAL_PANEL_GRAY as the 3D object color and VAL_BLACK as the text color. You can use Get3dBorderColors to determine the proper color value for the highlight and shadow colors, which are based on the 3D object color. |
conformToSystem | integer | Specify Yes (1) for this parameter if you want your toolbar to conform to the system colors. The toolbar background color and button color will conform to the system settings for 3D objects. Specify No (0) if you want the toolbar to conform to the color scheme of the parent panel. Note that if the parent panel has the attribute ATTR_CONFORM_TO_SYSTEM set to 1, the result will be the same as if you specified Yes for this parameter, because conforming to the system colors and conforming to the parent panel colors will be equivalent. This setting does not affect the bitmaps on the toolbar buttons, only the toolbar background and the frame area of the toolbar buttons. |
Output | ||
Name | Type | Description |
newToolbar | ToolbarType * | Returns the new toolbar. |
Name | Type | Description |
status | integer | Return value indicating whether the function was successful. A negative number indicates that an error occurred. |