C1ToolBars can be customizable at run time by setting the CustomizeButton property to True at design time.
When the customization is enabled a drop-down arrow appears on the toolbar at design time.
The pop-up menu appears at run time when you click on the drop-down arrow.
The Customize toolbars menu operates as follows:
Clicking on a command item from the menu removes the command button from the toolbar.
Clicking on the Reset menu item resets the toolbar back to its original setting.
Clicking on Customize menu item opens the Customize toolbars dialog box.
The Customize Dialog contains three tabs for modifying the C1ToolBar component:
On the bottom of each tab in the Customize toolbars dialog box, there is a Save, Restore, Reset, OK, and Cancel command button which can be used to save the updated settings of the toolbar, restore the update settings, reset the default settings, accept the new settings, and cancel the Customize toolbars respectively.
For the end-user customizations to be persisted in the application config file, command holder's Environment property must be added to dynamic properties.
To Save the Layout in the Application's .Config File:
In addition to saving your toolbar layout using the form's dynamic properties you can also use your own scheme for saving and restoring the toolbars layout. For finer control, save and set the value of the Layout property in your code instead.
The Toolbars tab contains options for creating and manipulating toolbars.
By default, the ButtonLook and the CustomizeButton properties are disabled.
The Button Layout properties are enabled when the ButtonLook property is set to Text and Image(the Text and Image radio button is selected). This is because the ButtonLayoutHorz property determines how the text is placed by the image (above, below, to the left, or to the right of the image).
The CustomizeButton is enabled when a new C1ToolBar is added to the dialog box.
The Commands tab contains two list boxes: Categories and Commands. The Categories list box contains the categories for all of the commands. The Commands list box contains all of the commands for each category.
Commands can be easily added to the toolbars by doing either of the following:
The following image illustrates a command being dragged from the Commands list to the Format toolbar on the form at run time.
The Options tab contains options for modifying C1ToolBar’s general appearance properties such as its look and feel and its colors and font.