ComponentOne

Ribbon for WinForms

Copyright  1987-2011 ComponentOne LLC. All rights reserved.
Corporate Headquarters ComponentOne LLC 201 South Highland Avenue 3rd Floor Pittsburgh, PA 15206 ∙ USA Internet: info@ComponentOne.com Web site: http://www.componentone.com Sales E-mail: sales@componentone.com Telephone: 1.800.858.2739 or 1.412.681.4343 (Pittsburgh, PA USA Office)

Trademarks The ComponentOne product name is a trademark and ComponentOne is a registered trademark of ComponentOne LLC. All other trademarks used herein are the properties of their respective owners. Warranty ComponentOne warrants that the original CD (or diskettes) are free from defects in material and workmanship, assuming normal use, for a period of 90 days from the date of purchase. If a defect occurs during this time, you may return the defective CD (or disk) to ComponentOne, along with a dated proof of purchase, and ComponentOne will replace it at no charge. After 90 days, you can obtain a replacement for a defective CD (or disk) by sending it and a check for $25 (to cover postage and handling) to ComponentOne. Except for the express warranty of the original CD (or disks) set forth here, ComponentOne makes no other warranties, express or implied. Every attempt has been made to ensure that the information contained in this manual is correct as of the time it was written. We are not responsible for any errors or omissions. ComponentOne’s liability is limited to the amount you paid for the product. ComponentOne is not liable for any special, consequential, or other damages for any reason. Copying and Distribution While you are welcome to make backup copies of the software for your own use and protection, you are not permitted to make copies for the use of anyone else. We put a lot of time and effort into creating this product, and we appreciate your support in seeing that it is used by licensed users only. This manual was produced using ComponentOne Doc-To-Help™.

Table of Contents
ComponentOne Ribbon for WinForms Overview......................................................................... 1 What's New in Ribbon for WinForms ..................................................................................................2 Revision History .................................................................................................................................3 What’s New in 2011 v1 .......................................................................................................................4 What’s New in 2010 v2 .......................................................................................................................4 What’s New in 2010 v1 .......................................................................................................................6 Installing Ribbon for WinForms...........................................................................................................6 Ribbon for WinForms Setup Files ........................................................................................................6 System Requirements ..........................................................................................................................7 Installing Demonstration Versions........................................................................................................7 Uninstalling C1Ribbon ........................................................................................................................8 End-User License Agreement ...............................................................................................................8 Licensing FAQs ..................................................................................................................................8 What is Licensing? ..............................................................................................................................8 How does Licensing Work? .................................................................................................................8 Common Scenarios .............................................................................................................................9 Troubleshooting ................................................................................................................................ 11 Technical Support ............................................................................................................................. 12 Redistributable Files .......................................................................................................................... 13 About This Documentation ............................................................................................................... 13 Namespaces...................................................................................................................................... 14 Creating a .NET Project .................................................................................................................... 15 Creating a Ribbon Application Project................................................................................................ 16 Adding the Ribbon for WinForms Controls to a Project ....................................................................... 16 Key Features.......................................................................................................................19 Ribbon for WinForms Quick Start ...........................................................................................21 Step 1 of 6: Add Controls to the Windows Form and Create the Ribbon Form ...................................... 21 Step 2 of 6: Add Ribbon Items to the Ribbon....................................................................................... 23 Step 3 of 6: Add Event Handlers to Ribbon Toggle Buttons in the Group .............................................. 25 Step 4 of 6: Set up the C1StatusBar ..................................................................................................... 27 Step 5 of 6: Load a Text File to the RichTextBox ................................................................................ 29 Step 6 of 6: Run the Quick Start Application ....................................................................................... 30 Ribbon for WinForms Elements ..............................................................................................31 Ribbon Form .................................................................................................................................... 31 Quick Access Toolbar........................................................................................................................ 35 Configuration Toolbar ....................................................................................................................... 36 Ribbon Tab....................................................................................................................................... 36 Ribbon Item Group ........................................................................................................................... 37 Ribbon Containers ............................................................................................................................ 40 Ribbon Items .................................................................................................................................... 41 Status Bar Items ................................................................................................................................ 44 Design-Time Support ............................................................................................................45 C1Ribbon and C1StatusBar Smart Tags .............................................................................................. 47 C1Ribbon and C1StatusBar Context Menus........................................................................................ 48 C1Ribbon Collection Editors ............................................................................................................. 50 Application Menu Collection Editors ................................................................................................. 51 Quick Access Toolbar Collection Editors ............................................................................................ 55 Configuration Toolbar Collection Editor ............................................................................................ 57

iii

......................................... 92 Color Picker Floating Toolbar ............................................................................ 104 Toggle Button Floating Toolbar ........................................... 126 Ribbon for WinForms Samples ............................. 63 RibbonGallery Menu Items Collection Editor .............................................................. 131 Adding Items to the Configuration Toolbar...... 65 RibbonToolBar Items Collection Editor ................. 86 Tab Floating Toolbar................................................................................... 130 Adding Ribbon Items ......................... 82 Ribbon Floating Toolbar ........................ 94 Combo Box Floating Toolbar ........................... 90 Check Box Floating Toolbar .............................................................................................................................................................................. 114 Html Tab............................................................................................................................................................................................................... 79 C1StatusBar RightPaneItems Collection Editor ......... 84 Application Menu Floating Toolbar .............................. 98 Gallery Floating Toolbar .................................................................................................................. 88 Button Floating Toolbar ................................................................................................. 79 C1StatusBar LeftPaneItems Collection Editor .............................................................................................................................................. 102 Separator Floating Toolbar ........................................................................................................................................................................RibbonTab Collection Editor .......................................................................... 59 RibbonGroup Collection Editor ................................................................................................................................................................................................................. 99 Label Floating Toolbar ...................................................................................................................................................................................................................................................................................................................................................................................... 123 Run-Time Interaction ................................................................................................................................................................................... 110 LeftPaneItems Floating Toolbar .............................................................................................................................................................................................................................. 129 Ribbon for WinForms Task-Based Help ...................................................................................................................... 115 Properties Tab..................................................... 125 Minimizing the Ribbon........................ 73 RibbonFontComboBox Menu Items Collection Editor ................................................................................................................................................. 113 Office Tab ....................................................... 118 Images for Ribbon Items ........................................................................................................ 120 XML Serialization of the Ribbon Layout .................................................................................................................................................................................................................................................................................................................................................................... 71 RibbonComboBox Menu Items Collection Editor ............................................... 101 Menu Floating Toolbar .................................................................................................................................................... 112 In-Place Text Editing.............................................................................................................................. 81 C1Ribbon Smart Designer ......................................................................... 130 Adding Items to the Hot List............................................................................................................................................................................................ 130 Adding Items to the Quick Access Toolbar . 96 Edit Box Floating Toolbar ..................................................................................... 118 Visual Styles ................................................................. 134 iv .................................................................................................... 67 RibbonMenu Items Collection Editor ........................................................................................................................................................................... 86 Group Floating Toolbar..................................................................................................................................................................................................................................................................................................................................................................................................... 111 RightPaneItems Floating Toolbar........................................................................ 108 Toolbar Floating Toolbar.......... 69 RibbonComboBox Items Collection Editor ........................................................................................................................................................... 75 RibbonSplitButton Items Collection Editor ............................................................................................ 61 RibbonGalleryItem Collection Editor ....... 113 ToolTip Editor ............................. 59 RibbonGroup Items Collection Editor .................... 117 Ribbon Appearance ......................................... 104 Split Button Floating Toolbar.............................................................................. 109 C1StatusBar Smart Designer ................................................................................................ 125 Customizing the Quick Access Toolbar .................. 106 Toggle Group Floating Toolbar....................................................................................................................................................................................... 77 C1StatusBar Collection Editors ..................................................................................................

............................................................................................................................................................................................................................. 153 Adding Status Bar Items ...... 150 Handling the RibbonButton............................................................................................... 154 Changing the Color Picker Theme Colors .................................................................................................. 171 Making a Windows 7-Style Application Button ......... 135 Adding a Tab to the Ribbon ............................................................................................................................................................................................. 170 Importing a Custom Image for the Application Button ...................................................................... 165 Working with the Application Menu ................................................. 167 Changing the Color of the Application Button.......................................................... 143 Creating A Rich ToolTip ....................................... 148 Handling Ribbon Events ................................... 162 Lining Up Combo/Edit Boxes on a Group ........................................................................................................... 158 Creating Shortcut Keys ..................................................................... 173 v ..................... 140 Adding Items to the Ribbon Group ................................................................................Click Event .............................................. 146 Embedding Controls in a Ribbon ............................ 162 Importing a Custom Image for the Application Button .............................................................................................................................................................................................. 151 Handling the RibbonToggleButton........................................ 167 Creating the Application Menu .........................................................Adding a Contextual Tab to the Ribbon. 160 Hiding/Showing Ribbon Items Using the Tree-based Designer .................................................................................................................................................................................... 155 Changing the Visual Style ............................................................................................................................................................................ 159 Displaying ToolTips for the Ribbon Items......... 152 Adding a Launcher Button to the Ribbon Group ...........................................................................................................................................................................................................................................Click Event ........... 139 Adding a Group to the Ribbon Tab .................................

.

ComponentOne Ribbon for WinForms Overview Make your Office 2007-style application interface complete with a Ribbon style menu. and task panes with a simpler system of interfaces. Perform tasks efficiently with reachable and discoverable functionalities. This enables . 1 . with the same look and feel as the new Microsoft Office 2007 UI. Located at the top of the screen.NET 2. the Ribbon replaces the traditional menus.0 developers to build Office 2007-style applications with little code and with great functionality. It organizes related commands (in the form of controls) into groups and related groups into tabs so that the commands are easier to find. ComponentOne Ribbon for WinForms delivers both Ribbon and Status Bar functionality. toolbars.

ContextualTabGroups property C1StatusBar Selectable property RibbonLabel MaxTextWidth property. Ribbon for WinForms's no-code design experience provides easy customization of the Quick Access Toolbar (QAT). 2 . and other interface elements.Complete with ComponentOne's Smart Designer support.) appears at the right edge of the label. RibbonTab Color property RibbonContextualTabGroup ForeColor property Gets or sets the text color of the contextual tab. This is the collection of RibbonContextualTabGroup components. The ellipsis character (. This property allows you to change the color of individual tabs. The property sets the maximum width of the label text in pixels. ToolTipSettings Active property RibbonComboBox DropDownAlign property This property sets the alignment of the dropdown portion relative to the given component. New FeaturesNew Members The following members have been added to the Ribbon for WinForms API: Class C1Ribbon Member Selectable property Description This property indicates whether the control can receive the input focus (it's True by default).. creating Office 2007 Ribbon style menus is this easy. improvements. 2010. groups. fixes. This property indicates whether the ToolTip is currently active. tabs.com/VersionHistory. 0 by default – no restrictions. and changes for each product is available in HelpCentral at http://helpcentral. The contextual tab groups appear in the title of C1RibbonForm.componentone.. Tip: A version history containing a list of new features.aspx. The property indicates whether the control can receive the input focus (it's True by default). With Ribbon for WinForms. What's New in Ribbon for WinForms This documentation was last revised for 2011 v1 on March 08. denoting that the text width extends beyond the specified width. Each tab group can contain a few RibbonTab. Font property Gets or sets the font of the contextual tab. RibbonGroup GroupToolTip property This property specifies the ToolTip string for a collapsed group button or a group button on the QAT.

Added the special “More Controls” button next to the Quick Access Toolbar.RibbonDatePicker DropDownAlign property This property sets the alignment of the dropdown portion relative to the given component. Ribbon templates have been updated. Improved the speed of KeyTips showing up under the Aero theme. which shows you how to add a conditional tab to the Ribbon whenever the user selects a specific element. The old property is hidden. Changes The RibbonGroup. New Features The following new features have been added to Ribbon for WinForms:    Updated the editor for the ToolTip property of various components.ToolTip property has been renamed to LauncherToolTip. RibbonSplitButton DropDownAlign property This property sets the alignment of the dropdown portion relative to the given component. but it is still available for backward compatibility. Improvements The following improvements have been made to Ribbon for WinForms:    Improved appearance of text labels on the Quick Access Toolbar. and the behavior of the "Minimize Ribbon" button on the ConfigToolBar panel has been updated. New Task-Based Help Added a new task-based help topic. RibbonMenu DropDownAlign property This property sets the alignment of the dropdown portion relative to the given component. 3 . Revision History The following topics provide a revision history for the last three releases of Ribbon for WinForms. Updated the Ribbon templates and added KeyTips to all Ribbon items. Adding a Contextual Tab to the Ribbon (page 135). The button displays a popup window with more QAT items that were hidden because of lack of space.

Please note that the ColoredButton property only works for the Windows 7style button. Office2010Blue.) Contains (RibbonGroup) Determines whether this collection contains the specified RibbonGroup. so the RibbonApplicationMenu. Contains (RibbonItem) - RibbonQatItemCollection   4 . and Windows7. For more information. What’s New in 2010 v2 The following enhancements were made to the Ribbon for WinForms in its 2010 v2 release:  Added the following methods to the C1Ribbon class: Class Member Contains method Description Overload list:  Contains (String) . The RibbonColorPicker’’s Themes property has been renamed to OfficeColorPalette.  New Features The following new features were added to Ribbon for WinForms:   Added the following items to the VisualStyle enumeration: Office2010Black. It occurs when the mouse pointer is over the RibbonTrackBar and the left mouse button is released. Changes The following changes have been made to Ribbon for WinForms:   C1Ribbon’’s HotTransitionEffect property has no effect in the current version and becomes hidden. Accessibility is now supported in C1Ribbon and C1StatusBar. This change doesn't affect backward compatibility. (Inherited from RibbonItemCollectionBase. This topic explains how to make a Windows 7 application button in the Office2007 visual styles. Task-Based Help The following task-based help has been added to Ribbon for WinForms: Topic Changing the Color of the Application Button (page 170) Making a Windows 7-Style Application Button (page 173) Description This topic explains how to change the color of a Windows 7-style application button. The same property of RibbonColorPickerItem has also been renamed.Win7Look property will have to be set to True if you are using anything other than an Office2010 visual style.What’s New in 2011 v1 New Members The following new members were added to Ribbon for WinForms:  Added the ColoredButton property to the RibbonApplicationMenu class. see Visual Styles (page 118).Determines whether the collection contains a RibbonItem with the given name. Office2010Silver. Added the MouseUp event to RibbonTrackBar. This property sets the color of the application menu button. It will be reintroduced in subsequent releases.

(Inherited from RibbonItemCollectionBase.Adds a RibbonButton item to the collection.Adds the specified RibbonItem to the collection.Removes the first occurrence of a RibbonButton with the specified text from this collection. (Inherited from RibbonItemCollection.Determines the index of the first occurrence of a RibbonButton with the specified text in this collection.)   Add method Overload list:  Add (String) . Remove (RibbonItem) .  Remove method Overload list:  Remove (String) .) Remove (RibbongGroup) Removes the first occurrence of the specified RibbonGroup from the collection. RibbonGroup) Inserts the specified RibbonGroup into this collection at the given index. IndexOf (RibbonItem) Determines the index of a specific RibbonItem in the collection. (Inherited from RibbonItemCollectionBase.)    Added the following properties to the C1Ribbon class: 5 .) Insert (Int32. (Inherited from RibbonItemCollectionBase. RibbonItem) Inserts the specified RibbonItem into this collection at the given index.Removes the first occurrence of the specified RibbonItem from the collection.Determines whether this collection contains the specified RibbonItem. (Inherited from RibbonItemCollectionBase.)   Insert method Overload list:  Insert (Int32.) IndexOf (RibbonGroup) Determines the index of a specific RibbonGroup in the collection.) Add (RibbonGroup) . IndexOf method Overload list:  IndexOf (String) . Add (RibbonItem) . (Inherited from RibbonItemCollection. (Inherited from RibbonItemCollection.Adds the specified RibbonGroup to the collection.

Class Member Description C1Ribbon SmallImageList property LargeImageList property Gets or sets the ImageList that contains the small images to display on the Ribbon. EXEs). and other containers. This property. indicates whether the gallery should appear expanded in a RibbonGroup. This property specifies the image key. Installing Ribbon for WinForms The following sections provide helpful information on installing ComponentOne Ribbon for WinForms. the corresponding menu item will be disabled in the item's context menu. Gets or sets the ImageList that contains the large images to display on the status bar. RibbonGalleryItem GripHandleVisible property ToolTipSettings Opacity property RibbonGroup CanBeAddedToQat property RibbonItem CanBeAddedToQat property SmallImageIndex property SmallImageKey property LargeImageIndex property LargeImageKey property What’s New in 2010 v1 No changes were made in the 2010 v1 release of Ribbon for WinForms. This property specifies the index of an image in the owner control's SmallImageList. This property specifies the index of an image in the owner control's LargeImageList. bin 6 . This property specifies the image key. the corresponding menu item will be disabled in the item's context menu. If the value of this property is False. which is True by default. If the value of this property is False. The directory contains the following subdirectories: Contains copies of all ComponentOne binaries (DLLs. C1StatusBar. This property specifies whether the user can add this item to the Quick Access Toolbar at runtime. This property gets or sets the opacity of the ToolTips between 0 (totally transparent) and 1 (totally opaque). It is also possible to add ribbon galleries to QAT. C1StatusBar SmallImageList property LargeImageList property. This property specifies whether the user can add this group to the Quick Access Toolbar at runtime. Ribbon for WinForms Setup Files The ComponentOne Studio for WinForms installation program will create the following directory C:\Program Files\ComponentOne\Studio for WinForms. Gets or sets the ImageList that contains the large images to display on the status bar. Gets or sets the ImageList that contains the small images to display on the Ribbon.

Contains samples and tutorials for Ribbon for WinForms. Contains Microsoft Help 2. The ComponentOne Studio for WinForms Help Setup program installs integrated Microsoft Help 2.NET Framework 2.C1Ribbon Contains files associated with Ribbon for WinForms.NET Disc Drive: CD or DVD-ROM drive if installing from CD Installing Demonstration Versions If you wish to try ComponentOne Ribbon for WinForms and do not have a serial number.0 and Microsoft Help Viewer help to the C:\Program Files\ComponentOne\Studio for WinForms directory in the following folders: H2Help HelpViewer Samples Samples for the product are installed in the ComponentOne Samples folder by default. The path of the ComponentOne Samples directory is slightly different on Windows XP and Windows 7/Vista machines: Windows XP path: C:\Documents and Settings\<username>\My Documents\ComponentOne Samples Windows 7/Vista path: C:\Users\<username>\Documents\ComponentOne Samples The ComponentOne Samples folder contains the following subdirectories: Common C1Ribbon Contains support and data files that are used by many of the demo programs. To view samples. You can access samples from the ComponentOne Sample Explorer. Contains Microsoft Help Viewer Visual Studio 2010 integrated documentation for all Studio components. System Requirements System requirements include the following: Operating Systems: Windows 2000 Windows 2003 Server Windows XP SP2 Windows Vista Windows Server 2008 Windows 7 Environments: . follow the steps through the installation wizard and use the default serial number. click the Start button and then click ComponentOne | Studio for WinForms | Samples | Ribbon Samples.NET Visual Basic .0 or later C# . 7 .0 integrated documentation for all Studio components.

To uninstall ComponentOne Studio for WinForms integrated help: End-User License Agreement All of the ComponentOne licensing information. (Users can also enter the serial number by clicking the License button on the About Box of any ComponentOne product. 3. use licensing to allow potential users to test products before they decide to purchase them.The only difference between unregistered (demonstration) and registered (purchased) versions of our products is that registered versions will stamp every application you compile so a ComponentOne banner will not appear when your users run the applications. this type of distribution would not be practical for the vendor or convenient for the user. is available online at http://www. Select ComponentOne Studio for WinForms and click the Remove button. 2. 2. he receives an installation program and a Serial Number. who could easily forget that the software being used is an evaluation version and has not been purchased. and the ComponentOne licensing model. or by rerunning the installation and entering the serial number in the licensing dialog. Click Yes to remove the integrated help. including the ComponentOne end-user license agreements. Open the Control Panel and select Add or Remove Programs (Programs and Features in Windows 7/Vista). Open Control Panel and select Add or Remove Programs (Programs and Features in Windows7/Vista). frequently asked licensing questions. which works with all types of components.) 8 . if available. It may help the user to understand and resolve licensing problems he may experience when using ComponentOne WinForms and ASP. Select ComponentOne Studio for WinForms Help and click the Remove button. Vendors would either have to distribute evaluation software with limited functionality. During the installation process. 3. Without licensing. Licensing is not only used to prevent illegal distribution of software products. Many software vendors. Licensing FAQs This section describes the main technical aspects of licensing. the user is prompted for the serial number that is saved on the system.componentone. Click Yes to remove the program. What is Licensing? Licensing is a mechanism used to protect intellectual property by ensuring that users are authorized to use software products. How does Licensing Work? ComponentOne uses a licensing model based on the standard set by Microsoft. 1. Uninstalling C1Ribbon To uninstall Ribbon for WinForms: 1. Note: The Compact Framework components use a slightly different mechanism for run-time licensing than the other ComponentOne components due to platform differences.com/SuperPages/Licensing/.NET products. or shift the burden of managing software licenses to customers. including ComponentOne. When a user decides to purchase a product.

When a licensed component is added to a form or Web page, Visual Studio obtains version and licensing information from the newly created component. When queried by Visual Studio, the component looks for licensing information stored in the system and generates a run-time license and version information, which Visual Studio saves in two files:   An assembly resource file which contains the actual run-time license A licenses.licx file that contains the licensed component strong name and version information

These files are automatically added to the project. In WinForms and ASP.NET 1.x applications, the run-time license is stored as an embedded resource in the assembly hosting the component or control by Visual Studio. In ASP.NET 2.x applications, the run-time license may also be stored as an embedded resource in the App_Licenses.dll assembly, which is used to store all run-time licenses for all components directly hosted by WebForms in the application. Thus, the App_licenses.dll must always be deployed with the application. The licenses.licx file is a simple text file that contains strong names and version information for each of the licensed components used in the application. Whenever Visual Studio is called upon to rebuild the application resources, this file is read and used as a list of components to query for run-time licenses to be embedded in the appropriate assembly resource. Note that editing or adding an appropriate line to this file can force Visual Studio to add run-time licenses of other controls as well. Note that the licenses.licx file is usually not shown in the Solution Explorer; it appears if you press the Show All Files button in the Solution Explorer's Toolbox, or select Show All Files from the Project menu. Later, when the component is created at run time, it obtains the run-time license from the appropriate assembly resource that was created at design time and can decide whether to simply accept the run-time license, to throw an exception and fail altogether, or to display some information reminding the user that the software has not been licensed. All ComponentOne products are designed to display licensing information if the product is not licensed. None will throw licensing exceptions and prevent applications from running.

Common Scenarios
The following topics describe some of the licensing scenarios you may encounter.

Creating components at design time
This is the most common scenario and also the simplest: the user adds one or more controls to the form, the licensing information is stored in the licenses.licx file, and the component works. Note that the mechanism is exactly the same for Windows Forms and Web Forms (ASP.NET) projects.

Creating components at run time
This is also a fairly common scenario. You do not need an instance of the component on the form, but would like to create one or more instances at run time. In this case, the project will not contain a licenses.licx file (or the file will not contain an appropriate run-time license for the component) and therefore licensing will fail. To fix this problem, add an instance of the component to a form in the project. This will create the licenses.licx file and things will then work as expected. (The component can be removed from the form after the licenses.licx file has been created). Adding an instance of the component to a form, then removing that component, is just a simple way of adding a line with the component strong name to the licenses.licx file. If desired, you can do this manually using notepad or Visual Studio itself by opening the file and adding the text. When Visual Studio recreates the application resources, the component will be queried and its run-time license added to the appropriate assembly resource.

9

Inheriting from licensed components
If a component that inherits from a licensed component is created, the licensing information to be stored in the form is still needed. This can be done in the following two ways:  Add a LicenseProvider attribute to the component. This will mark the derived component class as licensed. When the component is added to a form, Visual Studio will create and manage the licenses.licx file, and the base class will handle the licensing process as usual. No additional work is needed. For example: [LicenseProvider(typeof(LicenseProvider))] class MyGrid: C1.Win.C1FlexGrid.C1FlexGrid { // ... }  Add an instance of the base component to the form. This will embed the licensing information into the licenses.licx file as in the previous scenario, and the base component will find it and use it. As before, the extra instance can be deleted after the licenses.licx file has been created. Please note, that C1 licensing will not accept a run-time license for a derived control if the run-time license is embedded in the same assembly as the derived class definition, and the assembly is a DLL. This restriction is necessary to prevent a derived control class assembly from being used in other applications without a design-time license. If you create such an assembly, you will need to take one of the actions previously described create a component at run time.

Using licensed components in console applications
When building console applications, there are no forms to add components to, and therefore Visual Studio won't create a licenses.licx file. In these cases, create a temporary Windows Forms application and add all the desired licensed components to a form. Then close the Windows Forms application and copy the licenses.licx file into the console application project. Make sure the licenses.licx file is configured as an embedded resource. To do this, right-click the licenses.licx file in the Solution Explorer window and select Properties. In the Properties window, set the Build Action property to Embedded Resource.

Using licensed components in Visual C++ applications
There is an issue in VC++ 2003 where the licenses.licx is ignored during the build process; therefore, the licensing information is not included in VC++ applications. To fix this problem, extra steps must be taken to compile the licensing resources and link them to the project. Note the following: 1. 2. 3. 4. 5. Build the C++ project as usual. This should create an exe file and also a licenses.licx file with licensing information in it. Copy the licenses.licx file from the app directory to the target folder (Debug or Release). Copy the C1Lc.exe utility and the licensed .dlls to the target folder. (Don't use the standard lc.exe, it has bugs.) Use C1Lc.exe to compile the licenses.licx file. The command line should look like this: c1lc /target:MyApp.exe /complist:licenses.licx /i:C1.Win.C1FlexGrid.dll Link the licenses into the project. To do this, go back to Visual Studio, right-click the project, select Properties, and go to the Linker/Command Line option. Enter the following: /ASSEMBLYRESOURCE:Debug\MyApp.exe.licenses

10

6.

Rebuild the executable to include the licensing information in the application.

Using licensed components with automated testing products
Automated testing products that load assemblies dynamically may cause them to display license dialog boxes. This is the expected behavior since the test application typically does not contain the necessary licensing information, and there is no easy way to add it. This can be avoided by adding the string "C1CheckForDesignLicenseAtRuntime" to the AssemblyConfiguration attribute of the assembly that contains or derives from ComponentOne controls. This attribute value directs the ComponentOne controls to use design-time licenses at run time. For example: #if AUTOMATED_TESTING [AssemblyConfiguration("C1CheckForDesignLicenseAtRuntime")] #endif public class MyDerivedControl : C1LicensedControl { // ... } Note that the AssemblyConfiguration string may contain additional text before or after the given string, so the AssemblyConfiguration attribute can be used for other purposes as well. For example: [AssemblyConfiguration("C1CheckForDesignLicenseAtRuntime,BetaVersion")] THIS METHOD SHOULD ONLY BE USED UNDER THE SCENARIO DESCRIBED. It requires a designtime license to be installed on the testing machine. Distributing or installing the license on other computers is a violation of the EULA.

Troubleshooting
We try very hard to make the licensing mechanism as unobtrusive as possible, but problems may occur for a number of reasons. Below is a description of the most common problems and their solutions.

I have a licensed version of a ComponentOne product but I still get the splash screen when I run my project.
If this happens, there may be a problem with the licenses.licx file in the project. It either doesn't exist, contains wrong information, or is not configured correctly. First, try a full rebuild (Rebuild All from the Visual Studio Build menu). This will usually rebuild the correct licensing resources. If that fails follow these steps: 1. 2. 3. 4. Open the project and go to the Solution Explorer window. Click the Show All Files button on the top of the window. Find the licenses.licx file and open it. If prompted, continue to open the file. Change the version number of each component to the appropriate value. If the component does not appear in the file, obtain the appropriate data from another licenses.licx file or follow the alternate procedure following. Save the file, then close the licenses.licx tab. Rebuild the project using the Rebuild All option (not just Rebuild). Open the project and go to the Solution Explorer window.

5. 6. 1.

Alternatively, follow these steps:

11

For a complete list and a description of each. you have two options: Option 1 – Renew your subscription to get a new serial number.componentone. Some methods for obtaining technical support include: 12 . your subscription may have expired. you will receive a new serial number that you can use to license the new components (from the installation utility or directly from the About Box). There is no need to install any licenses on machines used as servers and not used for development. After that. including Web servers. The new subscription will entitle you to a full year of upgrades and to download the latest maintenance builds directly from http://prerelease.NET application uses WinForms user controls with constituent licensed controls. 6.x applications. there should be a licenses.com/SuperProducts/SupportServices/. Click the Show All Files button on the top of the window. 5. Open the project and go to the Solution Explorer window. 3. 2.x applications.NET 2. be sure that the App_Licenses. If you licensed the component over a year ago.dll assembly created during development of the application is deployed to the bin application bin directory on the Web server. therefore the licensing information will be saved into the executable (.com.NET 2. follow these steps: I have a licensed version of a ComponentOne product on my Web server but the components still behave as unlicensed.componentone. If you choose this option. For ASP. visit the ComponentOne Web site at http://www. Rebuild the project using the Rebuild All option (not just Rebuild). Find the licenses. products do not. 3. Find the licenses.licx file there. the run-time license is embedded in the WinForms user control assembly. Subscriptions expire. Close the project and reopen it.licx file and right-click it. In this case. Make sure that the serial number is still valid.licx file and delete it. 1. You can continue to use the components you received or downloaded while your subscription was valid. I downloaded a new build of a component that I have purchased.2. Check the Solution Explorer window. For ASP. you must be sure to rebuild and update the user control whenever the licensed embedded controls are updated. 4. Rebuild the project using the Rebuild All option (not just Rebuild). 7. The components must be licensed on the development machine. In this case.exe or . and now I'm getting the splash screen when I build my projects. Technical Support ComponentOne offers various support options. Option 2 – Continue to use the components you have.licx file). 4. the application can be deployed on any machine. Open the main form and add an instance of each licensed control.dll) when the project is built. If your ASP. Select the Build Runtime Licenses from its context menu (this will rebuild the App_Licenses.

This email will provide you with an Issue Reference ID and will provide you with a set of possible answers to your question from our Knowledgebase.C1Ribbon. Please contact Sales@ComponentOne. tips.Win. Please note that a ComponentOne User Account is required to participate in the ComponentOne Product Forums. Version Release History. and documentation is also available online. Redistributable Files ComponentOne Ribbon for WinForms is developed and published by ComponentOne LLC.Win. ComponentOne sponsors these areas as a forum for users to share information.Design.dll Site licenses are available for groups of multiple developers.dll C1. Contact technical support by using the online incident submission form or by phone (412. You will receive a response from one of the ComponentOne staff members via e-mail in 2 business days or less. with any application you develop to the extent that they are used separately on a single CPU on the client/workstation side of the network:     C1. Peer-to-Peer Product Forums and Newsgroups ComponentOne peer-to-peer product forums and newsgroups are available to exchange information.4738). You may also distribute the following Redistributable Files.     Note: You must create a ComponentOne Account and register your product with a valid serial number to obtain support using some of the above methods.C1Ribbon.C1Ribbon. we periodically monitor them to ensure accuracy of information and provide comments when appropriate. While ComponentOne does not provide direct support in the forums and newsgroups. When you submit an incident. searchable Online Help and more. Online Support via our Incident Submission Form This online support service provides you with direct access to our Technical Support staff via an online incident submission form. Technical Support and Sales issues should be sent directly to their respective departments. you'll immediately receive a response via e-mail confirming that you've successfully created an incident.Win.dll C1. Please note that e-mail sent to the Documentation team is for documentation feedback only.681. and techniques regarding ComponentOne products. samples.dll C1. Articles.4.Design. We recommend this as the first place to look for answers to your technical questions. Please note that this does not include issues related to distributing a product to end-users in an application. Online Support via HelpCentral ComponentOne HelpCentral provides customers with a comprehensive set of technical resources in the form of FAQs.com for details. please email the Documentation team.4. You may use it for development with Microsoft Visual Studio or any other programming environment that enables the user to use and integrate the control(s). About This Documentation Acknowledgements 13 .2. If you have suggestions on how we can improve our documentation.C1Ribbon. searchable Knowledge Base.2. Installation Issues Registered users can obtain help with problems installing ComponentOne products. royalty free.Win. Documentation Microsoft integrated ComponentOne documentation can be installed with each of our products.

C1Ribbon Ribbon.C1Ribbon object Dim Ribbon as C1.681. please call us or write: Corporate Headquarters ComponentOne LLC 201 South Highland Avenue 3rd Floor Pittsburgh.Win. If the reference is not unique. The following code fragment shows how to declare a C1Ribbon control using the fully qualified name for this class:   Visual Basic Dim ribbon As C1.C1Ribbon ribbon. ComponentOne If you have any suggestions or ideas for new features or controls. 14 .C1Ribbon.Win. For example. the C1Ribbon assembly also implements a class called C1Ribbon.NET produces an error stating that the name is ambiguous.componentone. The following code snippet demonstrates how to declare these objects:  Visual Basic ' Define a new object based on your C1Ribbon class Dim MyC1Ribbon as C1Ribbon ' Define a new C1Ribbon.C1Ribbon. PA 15206 • USA 412.681. and Windows Vista are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries.com/ ComponentOne Doc-To-Help This documentation was produced using ComponentOne Doc-To-Help® Enterprise.Microsoft.C1Ribbon  C# // Define a new object based on your C1Ribbon class C1Ribbon MyC1Ribbon.4384 (Fax) http://www.C1Ribbon C# C1. you can use it inside your project without qualification.Win. you must use a fully qualified reference to make the reference unique. // Define a new C1Ribbon. The namespace for the C1Ribbon control is C1. These conflicts with existing components are sometimes called name collisions. Visual Studio. Namespaces prevent ambiguity and simplify references when using large groups of objects such as class libraries. However. The general namespace for ComponentOne Windows products is C1. which can in turn contain other namespaces. if you create a new class named C1Ribbon. Visual Studio .4343 412. if you want to use the C1Ribbon class in the same project. Assemblies can contain multiple namespaces. Namespaces Namespaces organize the objects defined in an assembly. Windows. in which the developer of a class library is hampered by the use of similar names in another library.Win. Namespaces address a problem sometimes known as namespace pollution.C1Ribbon object C1. Visual Basic.Win. So.Win.C1Ribbon.

In addition.NET project.C1Ribbon. you can use the Imports statement (using in C#) to define an alias – an abbreviated name you can use in place of a fully qualified name.Win.Objects. 15 . 3. and select Windows Application from the list of Templates in the right pane. using MyC1Ribbon = MyProject.C1Ribbon Imports MyC1Ribbon = MyProject. Creating a . The New Project dialog box opens. MyC1Ribbon c2. For example.NET. complete the following steps: 1. you can use all the names in that namespace without qualification provided they are unique to the project. A new Microsoft Visual Studio . and uses these aliases to define two objects:  Visual Basic Imports C1Ribbon = C1.C1Ribbon. However. select New and click Project.Objects. a new Form1 is displayed in the Designer view.NET project is created in the specified location.C1Ribbon.Fully qualified names are object references that are prefixed with the name of the namespace where the object is defined.NET Project To create a new . To get around this. From the File menu in Microsoft Visual Studio .Win.C1Ribbon. the names themselves can get long and cumbersome. You can use objects defined in other projects if you create a reference to the class (by choosing Add Reference from the Project menu) and then use the fully qualified name for the object in your code. C1Ribbon c1. choose either Visual Basic Projects or Visual C# Projects. Under Project types. Enter or browse for a location for your application in the Location field and click OK. 2. Fully qualified names prevent naming conflicts because the compiler can always determine which object is being used. the following code snippet creates aliases for two fully qualified names.C1Ribbon Dim c1 As C1Ribbon Dim c2 As MyC1Ribbon  C# using C1Ribbon = C1. If you use the Imports statement without an alias.

In addition.Win. When you open Visual Studio. add these controls to the form or add a reference to the C1. Double-click the C1Ribbon and C1StatusBar controls from the Toolbox to add them to Form1. you can very easily create a new Ribbon application. 3. MainRibbonForm and ChildRibbonForm. the Create a ComponentOne Visual Studio 2008/2005 Toolbox Tab checkbox is checked. in the installation wizard. complete the following steps: 1. A new ComponentOne Ribbon Application project is created in the specified location. To create a new Ribbon application. Enter or browse for a location for your application in the Location field and click OK.C1Ribbon. ComponentOne Ribbon for WinForms provides the following controls:   C1Ribbon C1StatusBar To use C1Ribbon.NET. the following C1Ribbon controls will appear in the Visual Studio Toolbox customization dialog box: 16 .2 assembly in your project. Under Project types. The New Project dialog box opens. Creating a Ribbon Application Project If the ComponentOne Ribbon for WinForms Visual Studio templates are installed. see Adding the Ribbon for WinForms Controls to a Project (page 16). are created. you will notice a ComponentOne Studio for WinForms tab containing the ComponentOne controls has automatically been added to the Toolbox. Manually Adding Ribbon for WinForms to the Toolbox When you install C1Ribbon. Adding the Ribbon for WinForms Controls to a Project When you install ComponentOne Studio for WinForms. For information on adding a control to the Toolbox. choose either Visual Basic Projects or Visual C# Projects. 2. If you decide to uncheck the Create a ComponentOne Visual Studio 2008/2005 Toolbox Tab checkbox during installation. by default. select New and click Project. two new Ribbon Forms. and select Ribbon Application from the list of Templates in the right pane. From the File menu in Microsoft Visual Studio .4. you can manually add ComponentOne controls to the Toolbox at a later time.

4. if necessary) and right-click it to open the context menu. for example. In the dialog box.C1Ribbon.  1. 2.Win. Note that there may be more than one component or control for each namespace.NET Framework Components tab. To manually add the C1Ribbon controls to the Visual Studio Toolbox: 3. Make sure the Toolbox is visible (select Toolbox in the View menu. The Choose Toolbox Items dialog box opens. C1Ribbon. 17 . select Add Tab from the context menu and type in the tab name. C1Ribbon C1StatusBar Open the Visual Studio IDE (Microsoft Development Environment). go to the . To make the Ribbon for WinForms controls appear on their own tab in the Toolbox. Right-click the tab where the controls are to appear and select Choose Items from the context menu. Sort the list by Namespace (click the Namespace column header) and check the check boxes for all controls belonging to namespaces C1.

18 .C1Ribbon.Win. add the following Imports statements (using in C#): Imports C1. 2.Adding Ribbon for WinForms controls to the Form To add the C1Ribbon controls to the form: 1. Double-click the form caption area to open the code window.Win.dll file and click OK. See Namespaces (page 14) for more information. 2. 3. At the top of the file.NET tab or browse to find the C1. Select the Add Reference option from the Project menu of your project. Adding a Reference to the Assembly To add a reference to the C1Ribbon assembly: 1.2. Double-click each control or drag it onto your form. Add the C1Ribbon controls to the Visual Studio Toolbox. Select the ComponentOne C1Ribbon assembly from the list on the .C1Ribbon Note: This makes the objects defined in the C1Ribbon assembly visible to the project.

collection editors. Progress Bar Same look and feel of the Office 2007 Ribbon user interface Ribbon for WinForms UI elements achieve a look that is pixel-perfect with the MS Office 2007 interface. including: Ribbon controls. Color Picker. Font Combo Box. Easily embed arbitrary controls in the C1Ribbon Incorporate arbitrary controls in the Ribbon by using the RibbonControlHost element. Menu. for example in the following image the Ribbon includes a standard TextBox control:   For more information about how to add arbitrary controls. Gallery. C1Ribbon adapts to the cleaner. see Embedding Controls in a Ribbon (page 148).Key Features Create a sleek. Supports Office 2007. QAT (Quick Access Toolbar). Groups (with optional Dialog Launcher Button). Check Box. Benefit from ComponentOne Ribbon for WinForms. and a custom form. and Windows 7 Visual Styles Change Ribbon for WinForms's visual style by selecting one of the built-in Office 2007. more powerful. Toggle Button. Office 2007-style Ribbon by utilizing the most important features. Button. Separator.   19 . Combo Box. Toggle Group. Split Button. Track Bar. Label. from simple buttons to color palettes and galleries. Status Bar controls. Office 2010.  Design made easy through our design-time support Provides a wide range of design-time support including smart tags. Office 2010. more efficient Windows Aero interface. Supported C1Ribbon elements include: Application Menu. Edit Box. Visual Studio templates make creating a Ribbon Application easy Easily create Ribbon Applications and add Ribbon Forms to your project with installed Visual Studio 2005 and 2008 templates. Tabs. featuring:  Widest range of Office 2007-style navigation elements Ribbon for WinForms includes a rich set of Ribbon controls. Toolbar. and more. or Windows 7 styles. context-sensitive floating toolbars activated with a single mouse click. Configuration Toolbar.

Access to over 700 stock images for Ribbon items Ribbon for WinForms includes a built-in image library for Application menu, groups, and group items. Two image sizes available: large (32x32) and small (16x16). Accommodate a wealth of elements on an individual tab When resizing is necessary, the group collapses. Create a collection of ready-to-use templates Create tabs and control groups and save as XML templates to import later – no need to start from scratch again! Eliminate the tedious tasks associated with custom images With the time-saving, automatic image processing, you do not have to provide highlighted or grayed version of your custom images. Easily create Office 2007-style ToolTips The design-time multi-line editor enables you to easily create Office 2007-style ToolTips with the option to include images.

 

Easier access to the advanced capabilities using the dialog launcher button Included in the functional group of the Ribbon, the dialog launcher connects the simple functionality of the Ribbon and the advanced functionality of the dialog box. Supports application menu customization At design time, change the Application button's image and customize the Application menu to fit your needs; for example, display menu items as images, text, or both. Place the QAT in the most accessible location With just a mouse-click, move the position of the QAT above or below the Ribbon.

20

Quickly use a command with a keystroke Use the keyboard to complete specific commands. To make text bold, for example, you could use a CTRL+B key combination. Fully customizable Quick Access Toolbar (QAT) With the design-time smart designer, the developer can effortlessly add C1Ribbon items or the C1Ribbon group to the QAT. The developer can easily simplify QAT customization at run time, and add C1Ribbon items to the drop-down menu adjacent to the QAT. Context menu for Gallery items Attach individual context menus to each item in the Gallery element. Option to minimize the Ribbon Easily minimize the Ribbon to make more space available on your screen. 32-bit and 64-bit compatibility ComponentOne Ribbon for WnForms functions well in both 32-bit and 64-bit environments.

  

Ribbon for WinForms Quick Start
This section will lead you through the creation of a Ribbon Form that uses the C1Ribbon and C1StatusBar controls. In addition, it will show you how to modify the Ribbon's design, add some event handlers to the Ribbon, and load a sample text file in the editor. By following the steps outlined in the help, you will be able to create a simple text editor with the Ribbon user interface.

Step 1 of 6: Add Controls to the Windows Form and Create the Ribbon Form
To begin, create a Visual Studio WinForms project and add the C1Ribbon and C1StatusBar controls to your Toolbox. For more information on creating a new project, see Creating a .NET Project (page 15). To set up your new Ribbon Form, complete the following steps: 1. Add the C1Ribbon control to the Ribbon Form: From the Toolbox, double-click the C1Ribbon control to add it to your form. The Ribbon docks at the top of the Ribbon form. 2. Add the C1StatusBar control to the Ribbon Form: From the Toolbox, double-click the C1StatusBar control to add it to your form. The status bar docks at the bottom of the Ribbon Form. 3. Add the RichTextBox control to the Ribbon Form: a. b. From the Toolbox, double-click the RichTextBox control to add it to your form. From the Properties window, set the RichTextBox1.Dock property to Fill.

4. Create a Ribbon Form: Change the Windows Form to a Ribbon Form by modifying the code that declares your form: In Visual Basic Language: a. b. From the Solution Explorer, click the Show All Files button in the toolbar. From the Solution Explorer window, expand the Form1.vb node to reveal the Form's Designer.

21

c.

Double-click Form1.Designer.vb to open the Code Editor.

In C# Language: To open the Code Editor, right-click the Windows Form and select View Code. Continue in all Languages: In the Code Editor, replace the following:  Visual Basic Partial Class Form1 Inherits System.Windows.Forms.Form '... End Class C# partial class Form1 : Form { //... } With  Visual Basic Partial Class Form1 Inherits C1.Win.C1Ribbon.C1RibbonForm '... End Class C# partial class Form1 : C1.Win.C1Ribbon.C1RibbonForm { //... } Run you application and observe: You have successfully added the C1Ribbon, C1StatusBar, and RichTextBox controls to your project and created a Ribbon Form:

22

Add a toolbar to the Ribbon group: a. in the upper-left corner of the item to enable From the floating toolbar. b.In the next step you will add Ribbon items to the Ribbon. Click the toolbar to activate the item and click the glyph the floating toolbar. you may have noticed that the Ribbon included a pre-added tab with a group. 23 . b. A toggle button is added to the toolbar next to the existing button. Step 2 of 6: Add Ribbon Items to the Ribbon In the previous step when you added the C1Ribbon control to your Form. From the ToggleButton1 floating toolbar. Select Add ToolBar from the list of actions. click the Change Image button. c. click the Actions button and select Add ToggleButton. 2. The Change Image dialog box appears. In this step you'll add some Ribbon items to the group and then modify their properties using the smart designer. Click the Actions button. Click RibbonGroup1 to activate the item and enable the group's floating toolbar. A list of actions is revealed. c. A toolbar with a Ribbon button is added to the group. Add a toggle button and modify its properties: a. Switch to Design view and complete the following steps: 1.

In the Text Settings dialog box. You should now have one toggle button in the toolbar. 4.d. Delete the default "ToggleButton" Text. in the upper-left corner of the item to enable From the floating toolbar. b. Set the RibbonItem. click the Actions button and select Add ToggleButton. click the Text Settings button. Click the Actions button and select Delete to remove the button from the toolbar. Select the Ribbon button to active the item and enable the item's floating toolbar. Set the RibbonItem. in the upper-left corner of the item to enable From the floating toolbar. The second toggle button is added to the toolbar.ToolTip property to "Italic". 5. click the Actions button and select Add Toggle Button. Use the toggle button's floating toolbar to modify the properties for the ToggleButton2. The third toggle button is added to the toolbar. 3. Delete the first Ribbon button included with the toolbar: When you add a Ribbon toolbar item there's a Ribbon button included in the container. Complete the following steps to remove the first Ribbon button (since this toolbar will contain three Ribbon toggle buttons): a. 24 . Click ToggleButton2 to activate the floating toolbar and complete the following tasks:    Set the Image property to a 16x16 Italic preset image. b. then complete the following steps: a. Add a third toggle button and modify its properties: Click the toolbar to activate the item and click the glyph the floating toolbar. select Bold. The Text Settings dialog box appears. From the ToggleButton1 floating toolbar. Add a second toggle button and modify its properties: Click the toolbar to activate the item and click the glyph the floating toolbar. From the Small Image (16x16) drop-down list. e. then complete the following steps: a.ToolTip property to "Bold". f. set the following properties:   Delete the default "ToggleButton" Text.

Type the text "Home". Set the RibbonItem. 6. 3. Use the toggle button's floating toolbar to modify the properties for the ToggleButton3. The group's name now appears as Font. 5. 2. Italic. Press ENTER or click outside the editing box to accept the change.b. Type the text "Font". change the default tab and group Text properties. Double-click the default "Tab" text on the Ribbon to highlight it. Step 3 of 6: Add Event Handlers to Ribbon Toggle Buttons in the Group In this step you'll change the text that appears as the Ribbon tab and group names.   Delete the default "ToggleButton" Text. 4. To do this. The Ribbon group should now look like the following: In this step you successfully added Ribbon items to the group and modified their properties. complete the following steps: 1. The group's text is ready to be edited. Home now appears as the tab's name. Before you add event handlers to the toggle buttons. The tab's text is ready to be edited.ToolTip property to "Underline". In the next step you will change the Ribbon tab and group names and add event handlers to the three toggle buttons in RibbonGroup1. Double-click the default "Group" text on the Ribbon to highlight it. and then add event handlers to enable the Bold. Click ToggleButton3 to activate the floating toolbar and complete the following tasks:  Set the Image property to a 16x16 Underline preset image. Press ENTER or click outside the editing box to accept the change. and Underline Ribbon buttons in the Ribbon's Font group. The Ribbon group should now look like the following: 25 .

ByVal e As EventArgs) Handles RibbonToggleButton1.Underline) End Sub ' apply font style to the RichTextBox Sub ToggleSelectionFontStyle(ByVal fontStyle As FontStyle) If Me. // handles the Click event for the Bold button private void ribbonToggleButton1_Click(object sender. enter the following code in the Code Editor:  Visual Basic ' type the Imports directive for the namespace Imports C1.Click ' assign style for Underline button ToggleSelectionFontStyle(FontStyle.C1Ribbon. ByVal e As EventArgs) Handles RibbonToggleButton2.RichTextBox1.") Else Me.RichTextBox1.Style Xor fontStyle) End If Me.Click ' assign style for Italic button ToggleSelectionFontStyle(FontStyle.Italic).Bold) End Sub ' handles the Click event for the Italic button Private Sub RibbonToggleButton2_Click(ByVal sender As Object. EventArgs e) { // assign style for Bold button ToggleSelectionFontStyle(FontStyle.Italic) End Sub ' handles the Click event for the Underline button Private Sub RibbonToggleButton3_Click(ByVal sender As Object.RichTextBox1.Focus End Sub  C# // type the using directive for the namespace using C1.C1Ribbon ' handles the Click event for the Bold Private Sub RibbonToggleButton1_Click(ByVal sender As Object. Me.Win. and Underline) in the Ribbon's Font group.SelectionFont Is Nothing Then MessageBox. Italic.SelectionFont = New Font(Me.Bold).To enable the Ribbon buttons (Bold. EventArgs e) { // assign style for Italic button ToggleSelectionFontStyle(FontStyle.SelectionFont.Click ' assign style for Bold button ToggleSelectionFontStyle(FontStyle.Win. ByVal e As EventArgs) Handles RibbonToggleButton3.SelectionFont.RichTextBox1. } // handles the Click event for the Italic button private void ribbonToggleButton2_Click(object sender.RichTextBox1.Show("Cannot change font style while selected text has more than one font. 26 .

} // handles the Click event for the Underline button private void ribbonToggleButton3_Click(object sender, EventArgs e) { // assign style for Underline button ToggleSelectionFontStyle(FontStyle.Underline); } // apply font style to the richTextBox void ToggleSelectionFontStyle(FontStyle fontStyle) { if (this.richTextBox1.SelectionFont == null) { MessageBox.Show("Cannot change font style while selected text has more than one font."); } else { this.richTextBox1.SelectionFont = new Font(this.richTextBox1.SelectionFont, this.richTextBox1.SelectionFont.Style ^ fontStyle); } this.richTextBox1.Focus(); } You have successfully added event handlers to the three toggle buttons in RibbonGroup1. In the next step, you will set up the status bar by adding a progress bar in the left pane and a track bar in the right pane.

Step 4 of 6: Set up the C1StatusBar
The C1StatusBar is displayed at the bottom of the Ribbon Form. The C1StatusBar provides panel styles which are used to provide feedback to the Ribbon end users. To add panel styles which enable the end-users to see the progress bar in the left pane and the track bar in the right pane, complete the following steps: 1. Add a ProgressBar to the left status bar pane: a. b. c. Click C1StatusBar LeftPaneItems to activate the item and click the glyph the item to enable the floating toolbar. Click the Actions button. A list of actions is revealed. Select Add ProgressBar: in the upper-left corner of

27

d.

Select the progress bar to activate it, and set following properties in the Properties window:   Name = "progressbar" RibbonProgressBar.Value = 30

2. Add a Button to the right status bar pane and modify its properties: a. b. c. d. Click C1StatusBar RightPaneItems to activate the item and click the glyph the item to enable the floating toolbar. Click the Actions button. A list of actions is revealed. Select Add Button. Select the button to activate it, and set the following properties in the Properties window:    Name = "button" RibbonItem.SmallImage = None RibbonButton.Text = "30%" in the upper-left corner of

3. Add a TrackBar to the right status bar pane and modify its properties: a. b. c. d. Click C1StatusBar RightPaneItems to activate the item and click the glyph the item to enable the floating toolbar. Click the Actions button. A list of actions is revealed. Select Add TrackBar. The track bar is added to the right status bar pane. Select the track bar to activate it, and in the Properties window set the Name property to "trackbar". in the upper-left corner of

28

4. Adjust the width of the right status bar pane: Select the right status bar pane to activate it, and set the C1StatusBar.RightPaneWidth property to 150 in the Properties window. 5. Add code to enable the left and right status bar pane items: In the Code Editor, add the following code to enable the items on the left and right panel:  Visual Basic ' type the Imports directive for the namespace Imports C1.Win.C1Ribbon Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load trackbar.SmallChange = 1 trackbar.LargeChange = 5 trackbar.Minimum = 0 trackbar.Maximum = 100 trackbar.Value = 30 AddHandler trackbar.Scroll, AddressOf trackbar_Scroll End Sub Sub trackbar_Scroll(ByVal sender As Object, ByVal e As EventArgs) Dim val As Integer = trackbar.Value progressbar.Value = val button.Text = val.ToString + "%" End Sub  C# // type the using directive for the namespace using C1.Win.C1Ribbon; private void Form1_Load(object sender, EventArgs e) { trackbar.SmallChange = 1; trackbar.LargeChange = 5; trackbar.Minimum = 0; trackbar.Maximum = 100; trackbar.Value = 30; trackbar.Scroll += new EventHandler(trackbar_Scroll); } void trackbar_Scroll(object sender, EventArgs e) { int val = trackbar.Value; progressbar.Value = val; button.Text = val.ToString() + "%"; } You have successfully added items to the status bar. Next, you will load a rich text file (RTF) for editing.

Step 5 of 6: Load a Text File to the RichTextBox
In this step you will load a rich text file (RTF) into your project as the main body of your text editor. To load a RTF for editing, complete the following steps: 1. Add the following code to the Form.Load event:  Visual Basic Me.RichTextBox1.LoadFile("C:\MyFile.rtf")

29

rtf"). by adding items to the Ribbon group and status bar. click the Start Debugging button and notice the following results:   Select some text in the text box and click the Bold. Click the and buttons on the track bar or click and drag the slider and notice the progress bar and the button text values change simultaneously.richTextBox1. Now that you have added the RTF for editing. Load a sample text file in the editor. Add some event handlers to the Ribbon. You may load any RTF file to use for editing. Congratulations. C# this. and Underline buttons to format the text. you have completed the C1Ribbon quick start! In this quick start you have learned how to:     Create a Ribbon Form that uses the C1Ribbon and C1StatusBar controls. you can run the application and explore the run-time interaction in the last step of the quick start. Step 6 of 6: Run the Quick Start Application To run the quick start application. Italic.LoadFile(@"C:\MyFile. 30 . Modify the Ribbon's design. Note that you will have to change file path to match a file path on your machine.

The Ribbon Form. Ribbon Item Group (page 37) The RibbonGroup represents a group of items on the Ribbon tab. Configuration Toolbar (page 36) The RibbonConfigToolBar is a customizable toolbar with commonly used commands.  Application Button (page 31) The main large. 31 . Ribbon Form The Ribbon Form is represented by the C1RibbonForm class and has been calculated to display the C1Ribbon and C1StatusBar controls. Ribbon Form's Elements Title Bar The Ribbon Form's title bar displays the form's caption. For more information on each Ribbon item. round button at the top-left corner of the application window. Ribbon Containers (page 40) The RibbonItemContainer is a Ribbon item that can contain other Ribbon items. When the C1Ribbon control is added to the Ribbon Form. which can be changed using the Form.        Quick Access Toolbar (page 35) The RibbonQat is a customizable toolbar with frequently used buttons and other elements. which presents a dropdown menu (RibbonApplicationMenu) when the button is clicked.Ribbon for WinForms Elements The following Ribbon elements make up the Ribbon User Interface (UI):  Ribbon Form (page 31) The Ribbon Form is represented by the C1RibbonForm class and has been calculated to display the C1Ribbon and C1StatusBar controls. Ribbon Tab (page 36) The RibbonTab organizes related Ribbon groups on one page. like a Windows Form. Ribbon Items (page 41) The RibbonItem exists in a Ribbon container or group. see the following topics.Text property. contains a title bar and a client region. Status Bar Items (page 44) The C1StatusBar items exist in the right or left pane of the status bar. the title bar is automatically displayed with the Quick Access Toolbar (QAT) within the title bar.

or both. The menu items can be displayed as images.Application Button The main application button is located at the upper-left corner of the Ribbon within the Ribbon Form's title bar. Application Menu The RibbonApplicationMenu provides access to the Application menu of main commands that operate on the document as a whole. At run time. simply click the application button to reveal the list of main commands. Here is an example of an Application menu that was created: 32 . text.

add a Windows 7-style application button. For details on modifying the main application button. see the Importing a Custom Image for the Application Button (page 162). click the Show All Files button in the toolbar. you can add a custom image. and Creating the Application Menu (page 167) topics. expand the Form1. To change the Windows Form to a Ribbon Form. complete the following steps: In Visual Basic Language: 1. a Windows Form appears in design view. 2. From the Solution Explorer window. Making a Windows 7-Style Application Button (page 173). From the Solution Explorer.You can easily customize the main button to fit your needs. For example.vb node to reveal the Form's Designer. 33 . and add your own items to the Start menu. How to Create a Ribbon Form When you create a new Windows Application project. Changing the Color of the Application Button (page 170).

To open the Code Editor. right-click the Windows Form and select View Code.C1RibbonForm '. In the Code Editor.. Here you can see the difference between the Windows Form and the Ribbon Form: 34 . 4. Double-click Form1.Win.C1RibbonForm { //.. } In C# Language: Continue in all Languages:  With   6. replace the following:  Visual Basic Partial Class Form1 Inherits System..Forms.Form '..C1Ribbon.. Switch back to Design view and notice that the Form now has the look and feel of the Ribbon style.. 5.C1Ribbon..Win. End Class C# partial class Form1 : Form { //..vb to open the Code Editor. } Visual Basic Partial Class Form1 Inherits C1. End Class C# partial class Form1 : C1.Windows.3.Designer.

BelowRibbon property. To move the QAT below the Ribbon at run time. The QAT is located in the upper-left corner next to the main application button or below the Ribbon. use the RibbonQat.Quick Access Toolbar The Quick Access Toolbar (QAT) provides quick access for commonly used commands to increase productivity. click the drop-down arrow next to the QAT and select Show Below the Ribbon. 35 . and Repeat): The user can position the QAT below the Ribbon. The following Ribbon shows a QAT with three Ribbon button items (Save. To change the position of the QAT at design time. Undo.

Paragraph. the user can customize the QAT at run time. Unlike the QAT. Font. the tab contains an organized collection of program tasks. you eliminate the need to hunt through tabs and groups since your items are now in the forefront. By placing the items in the configuration toolbar. By placing the most commonly used items in the QAT. and Styles. For steps showing how to customize the QAT at design time. The following image shows the Home tab with four groups: Clipboard. Additionally.You can add or remove items to the QAT to customize it to fit your needs at design time. see Adding Items to the Quick Access Toolbar (page 130). you eliminate the need to hunt through tabs and groups since your items are now in the forefront. 36 . For steps showing how to customize the configuration toolbar at design time. Ribbon Tab The RibbonTab represents the main functionality groups of the program. The following Ribbon shows the configuration toolbar with one Ribbon button item (Help): You can add or remove Ribbon items to the configuration toolbar to customize it to fit your needs. The configuration toolbar is always located in the upper-right corner of the Ribbon on the same level as the Ribbon tabs. Configuration Toolbar The Ribbon configuration toolbar (RibbonConfigToolBar) provides another way for the user to place commonly used commands. the configuration toolbar cannot be changed by the user or moved below the Ribbon. see Adding Items to the Configuration Toolbar (page 134).

which has numerous tasks that are organized into groups and have labels. The group can also include a dialog box launcher button which provides access to advanced capabilities. making it easier for the user to browse. and so on. such as buttons.One click on a tab provides access to commands with labels that help users identify the appropriate icon or button for a specific command. toolbars. Additionally. The following image shows the Home tab with four groups: Clipboard. and Styles: The RibbonGroup can contain a number of Ribbon items. the following Font group organizes related font commands and contains numerous Ribbon items: 37 . check boxes. For example. Grouping related commands in a RibbonGroup makes it easier to discover and locate the commands. the following Ribbon has an Insert tab. within the tab the commands are organized to provide a visual hierarchy. Ribbon Item Group Each Ribbon tab contains a set of Ribbon groups. Font. For example. menus. Paragraph. combo boxes. This organization makes it easy for the user to discover commands necessary to complete a specific action.

the existing Ribbon groups may have to resize to make room on the tab for the new group(s). To see a list of available Ribbon items. If there is not enough room on the tab to display all of the group's items at one time. the large icons in the group are automatically replaced with small icons and text is hidden if space does not allow for the text. click the Actions button located on the group floating toolbar (page 88) and choose from the following list: 38 . you can easily add Ribbon items to the RibbonGroup. then the group collapses. Items Available to Add to the Group With the design-time support. If resizing is necessary.Collapsing Group Note that when more Ribbon groups are added.

see the Adding Items to the Ribbon Group (page 143) topic. A group can contain only a single dialog launcher button. Dialog Launcher Button Included in the functional group of the Ribbon. the dialog launcher connects the simple functionality of the Ribbon and the advanced functionality of the dialog box.For steps on adding items to the Ribbon group. The following image shows the Font group's dialog launcher button: 39 .

where each toolbar contains various Ribbon items: 40 .DialogResult. Double-click the empty area to the right of the DialogLauncherClick event. click the Events button.C1Ribbon.To implement the dialog launcher button: 1.Win. Font font = this.Windows.RichTextBox1. if (dlg.richTextBox1. Enter the event handling code so that the entire event handler looks like this:  Visual Basic ' type the Imports directive for the namespace Imports C1. Select the group by clicking it.SelectionFont.Font End If End Sub  C# // type the using directive for the namespace using C1.SelectionFont = dlg. An empty event handler will be added.Forms. Ribbon Containers The C1Ribbon includes one Ribbon toolbar container to hold an organize ribbon items.DialogResult.Font = font End If If (dlg.SelectionFont = dlg.Win.Name property has been set to FontGroup.Font = font.ShowDialog () != System.C1Ribbon Private Sub FontGroup_DialogLauncherClick (ByVal sender As System.RichTextBox1. } Note that for the above code the RibbonGroup.richTextBox1. For example. In the Properties window.DialogLauncherClick Dim dlg As FontDialog = New FontDialog Dim font As Font = Me.EventArgs) Handles FontGroup. private void FontGroup_DialogLauncherClick (object sender.SelectionFont If Not (font Is Nothing) Then dlg. EventArgs e) { FontDialog dlg = new FontDialog ().Forms. The RibbonToolbar is a horizontal styled container for other RibbonItem elements. 4. 3. the following Ribbon group has two toolbar items. ByVal e As System.OK) Then Me.Windows.Object. 2.ShowDialog = System. this. if (font != null) dlg.Font.OK) return.

Next. check boxes. You can quickly add more Ribbon items to the toolbar using the smart designer. Simply click the glyph in the upper-left corner of the toolbar to enable its floating toolbar. combo boxes. buttons. labels. a Ribbon button appears in the container. The following Show/Hide group contains numerous RibbonCheckBox elements: 41 . to the Ribbon toolbar. such as. Ribbon Items The C1Ribbon containers can hold the following Ribbon items: Button The RibbonButton items in this Font group are highlighted below: Check Box The check box control allows the user to validate or invalidate an option.When you add a toolbar to the Ribbon group. click the Actions button on the item's floating toolbar and select an item. For example. in the following image the Add Button is being selected: You can continue to add more Ribbon items. and so on.

A gallery may be displayed in either collapsed or expanded view. The RibbonTextBox element in this Proofing group is highlighted below: Gallery A gallery consists of gallery groups. preview the results. and more: Combo Box A combo box is a combination of a drop-down list or list box and a single-line text box. The RibbonComboBox item in this Font group is highlighted below: Text Box Represents a text box control. This results-oriented approach allows users to quickly see the features and make a selection from a group of items. For example. and choose a design without having to navigate through a number of menus and dialog boxes: 42 . a user can view a gallery with different styles. standard colors.Color Picker A color picker is a button that shows a drop-down color palette. Click the color picker's drop-down arrow to reveal the color palette. which contains theme colors. Use the RibbonColorPicker to select a specific color from a preset palette. The RibbonGallery is designed to allow the user to select items visually in a grid or menu-like layout.

or drop-down element to visually separate groups of Ribbon items. The RibbonSeparator items in this Paragraph group are highlighted below: 43 . Click the font combo box to reveal the list of available font styles: Label The RibbonLabel elements in this Clipboard group are highlighted below: Menu This is a button that shows a drop-down menu.Font Combo Box A RibbonFontComboBox is a combination of a drop-down list or list box that shows available font styles and a single-line text box. toolbar. Use a menu button when you need a menu for a small set of related commands. The following Styles group contains a RibbonMenu item: Separator The separator item can be used in a Ribbon group.

Use a split button to combine a set of variations of a command. acts as a radio button (checking one will uncheck all others). but works like a check box.Split Button A split button combines a regular button and a drop-down list. The RibbonSplitButton elements in this Paragraph group are highlighted below: Toggle Button A toggle button displays like a command button. especially when one of the commands is used often. When used within a toggle group. The RibbonToggleButton elements in this Paragraph group are highlighted below: Status Bar Items The C1StatusBar can hold the following items:            button color picker combo box font combo box label menu separator split button toggle button track bar progress bar 44 .

For details on the toggle group. You might use a track bar to allow the user to zoom in and zoom out of a document window. Track Bar The RibbonTrackBar functions similar to the standard System.Windows. Smart Tag 45 .TrackBar control and is designed specifically for use in a C1StatusBar.Forms. The following Ribbon sample form shows a status bar with a progress bar in the left pane and a track bar in the right pane: Progress Bar The RibbonProgressBar element displays a bar that fills in from left to right with the system highlight color as an operation progresses. see Ribbon Containers (page 40). see Ribbon Items (page 41). Design-Time Support ComponentOne Ribbon for WinForms provides visual editing to make it easier to create the Ribbon. You can make changes to the Ribbon by using one or more of the following visual editors: Properties Window You can access the C1Ribbon and C1StatusBar properties simply by right-clicking on the control and selecting Properties or by selecting the class from the drop-down box of the Properties window.For information on each Ribbon item.

the C1Ribbon and C1StatusBar controls include a smart tag. C1Ribbon provides the following collection editors:                    RibbonApplicationMenu BottomPaneItems Collection Editor RibbonApplicationMenu LeftPaneItems Collection Editor RibbonApplicationMenu RightPaneItems Collection Editor QAT Items Collection Editor QAT MenuItems Collection Editor RibbonConfigToolBar Items Collection Editor RibbonTab Collection Editor RibbonGroup Collection Editor RibbonGroup Items Collection Editor RibbonGalleryItem Collection Editor RibbonGallery Menu Items Collection Editor RibbonToolBar Items Collection Editor RibbonMenu Items Collection Editor RibbonComboBox Items Collection Editor RibbonComboBox Menu Items Collection Editor RibbonFontComboBox Menu Items Collection Editor RibbonSplitButton Items Collection Editor StatusBar LeftPaneItems Collection Editor StatusBar RightPaneItems Collection Editor Smart Designers The smart designers enable you to have complete control over creating a powerful and enhancing Ribbon and status bar. see C1Ribbon and C1StatusBar Smart Tags (page 47). For more information on how to use the smart tags. For more information on the C1Ribbon and C1StatusBar smart designer. A smart tag represents a shortcut tasks menu that provides the most commonly used properties in each control. You can invoke the tasks menu by clicking on the smart tag ( ) in the upper-right corner of each control. Collection Editors The main part of each of the collection editor's application consists of a Windows form which conveniently allows you to add Ribbon items and edit their properties. see the C1Ribbon Smart Designer (page 82) and C1StatusBar Smart Designer (page 110) topics. Context Menu You can use the C1Ribbon and C1StatusBar controls' context menu for additional functionality at design time. For more information about using the in-place editing feature see the In-Place Text Editing (page 113) topic. In-Place Text Editing You can quickly edit Ribbon elements' labels using the in-place editing feature. 46 .In Visual Studio 2005. See the C1Ribbon and C1StatusBar Context Menus (page 48) topic for details.

C1Ribbon Smart Tag To access the C1Ribbon Tasks menu.  Save Ribbon Template Clicking on the Save Ribbon Template link opens Save Ribbon Template dialog box where you can save the Ribbon layout as an XML file.  About C1Ribbon Clicking on the About C1Ribbon item displays the About ComponentOne C1Ribbon dialog box.  Enable Smart Designer Deselecting the Enable Smart Designer check box turns off the smart designer functionality. which is helpful in finding the version number of C1Ribbon and online resources. This will open the C1Ribbon Tasks menu. This will open the C1StatusBar Tasks menu. C1StatusBar Smart Tag To access the C1StatusBar Tasks menu. above or below. click on the smart tag ( ) in the upper-right corner of the C1Ribbon control. and selecting the check box enables the smart designer. click on the smart tag ( ) in the upper-right corner of the C1StatusBar control. The C1Ribbon Tasks menu operates as follows:  Load Ribbon Template Clicking on the Load Ribbon Template link opens the Load Ribbon Template dialog box where you can import an XML file that contains the pre-formatted Ribbon.  QAT Location Clicking on the QAT Location drop-down arrow allows you to select the location. of the Quick Access Toolbar in relation to the Ribbon. The default style is Office2007Blue. 47 .C1Ribbon and C1StatusBar Smart Tags The C1Ribbon and C1StatusBar controls each provide quick and easy access to common properties through their smart tag.  Visual Style Clicking on the Visual Style drop-down arrow opens a list of available Office 2007 themes to choose from.

which is helpful in finding the version number of C1Ribbon and online resources.  Enable Smart Designer Deselecting the Enable Smart Designer check box turns off the smart designer functionality.  About C1StatusBar Clicking on the About C1StatusBar item displays the About ComponentOne C1Ribbon dialog box. 48 . C1Ribbon Context Menu Right-click on the C1Ribbon control to open its context menu.The C1StatusBar Tasks menu operates as follows:  Load StatusBar Template Clicking on the Load StatusBar Template link opens the Load StatusBar Template dialog box where you can import an XML file that contains the pre-formatted status bar. and selecting the check box enables the smart designer. The default style is Office2007Blue.  Visual Style Clicking on the Visual Style drop-down arrow opens a list of available Office 2007 themes to choose from. C1Ribbon and C1StatusBar Context Menus The C1Ribbon and C1StatusBar controls each provide a context menu for additional functionality to use at design time.  Save StatusBar Template Clicking on the Save StatusBar Template link opens Save StatusBar Template dialog box where you can save the status bar layout as an XML file.

 Localize Opens the Localize dialog box.  Load Ribbon Template Clicking on the Load Ribbon Template item opens the Load Ribbon Template dialog box where you can import an XML file that contains the pre-formatted Ribbon. from where you can add user-defined localization for run-time string resources. which is helpful in finding the version number of C1Ribbon and online resources.  Save Ribbon Template Clicking on the Save Ribbon Template item opens Save Ribbon Template dialog box where you can save the Ribbon layout as an XML file.The C1Ribbon context menu operates as follows:  About C1Ribbon Clicking on the About C1Ribbon item displays the About ComponentOne C1Ribbon dialog box. 49 . C1StatusBar Context Menu Right-click on the C1StatusBar control to open its context menu.

C1Ribbon Collection Editors The main part of each of the collection editor's application consists of a Windows form which conveniently allows you to add Ribbon items and edit their properties.  Localize Opens the Localize dialog box.The C1StatusBar context menu operates as follows:  About C1StatusBar Clicking on the About C1StatusBar item displays the About ComponentOne C1Ribbon dialog box. which is helpful in finding the version number of C1Ribbon and online resources. from where you can add user-defined localization for run-time string resources.  Load StatusBar Template Clicking on the Load StatusBar Template link opens the Load StatusBar Template dialog box where you can import an XML file that contains the pre-formatted status bar. C1Ribbon provides the following collection editors:      Application Menu Collection Editors Quick Access Toolbar Collection Editors Configuration Toolbar Collection Editor Ribbon Tab Collection Editor Ribbon Group Collection Editor 50 .  Save StatusBar Template Clicking on the Save StatusBar Template link opens Save StatusBar Template dialog box where you can save the status bar layout as an XML file.

LeftPane. Additionally. use the RibbonApplicationMenu BottomPaneItems Collection Editor: 51 . and RightPane) allow you to add Ribbon items to the Start menu or remove Ribbon items from the Start menu. Bottom Pane To edit the Application menu's bottom pane. you can edit the item's properties.         Ribbon Group Items Collection Editor Ribbon GalleryItem Collection Editor RibbonGallery Menu Items Collection Editor Ribbon ToolBar Items Collection Editor Ribbon Menu Items Collection Editor RibbonComboBox Items Collection Editor RibbonComboBox Menu Items Collection Editor RibbonFontComboBox Menu Items Collection Editor Ribbon SplitButton Items Collection Editor The following topics briefly introduce the C1Ribbon collection editors and explain how to access each collection editor. Application Menu Collection Editors The Application menu consists of three collection editors:    RibbonApplicationMenu BottomPaneItems Collection Editor RibbonApplicationMenu LeftPaneItems Collection Editor RibbonApplicationMenu RightPaneItems Collection Editor The Ribbon application menu's collection editors (BottomPane.

use the RibbonApplicationMenu LeftPaneItems Collection Editor: 52 . Left Pane To edit the Application menu's left pane.Clicking the Add button will add Ribbon button(s) to the Application menu.

use the RibbonApplicationMenu RightPaneItems Collection Editor: 53 .Clicking the Add drop-down button will reveal a drop-down list with the following Ribbon items available to add to the Application menu's left pane:       RibbonButton RibbonLabel RibbonMenu RibbonSeparator RibbonSplitButton RibbonToggleButton Right Pane To edit the Application menu's right pane.

or RightPaneItems property and then click the ellipsis button to open the collection editor for each menu pane. In the Properties window. 3. 54 . Click the application button to activate it. Add a C1Ribbon control to the Ribbon Form. LeftPaneItems. 2. To access the Ribbon Application menu's collection editors: 1.Clicking the Add button will add list item(s) to the Application menu. click on the (Collection) next to the BottomPaneItems.

or edit the items in the QAT. you can edit the item's properties.Quick Access Toolbar Collection Editors The Quick Access Toolbar (QAT) consists of the following collection editors:   QAT Items Collection Editor QAT MenuItems Collection Editor The QAT's collection editors allow you to add or remove Ribbon items to and from the QAT or QAT's menu. use the QAT Items Collection Editor: 55 . Additionally. QAT Items Collection Editor To add. remove.

3. The QAT Items Collection Editor appears. then click the ellipsis button. To access the QAT Items Collection Editor: 1. remove. Add a C1Ribbon control to the Ribbon Form. or edit the items in the QAT's menu (hot list). 2. You can arrange the items in the QAT Items list using the up and down arrow buttons. expand the Qat property node. QAT MenuItems Collection Editor To add. use the QAT MenuItems Collection Editor: 56 . In the Properties window. Click the C1Ribbon control to activate it. click on the (Collection) next to the Items property.Selecting an item in the Existing Items list and clicking the > button adds the item to the QAT Items list.

Additionally. expand the Qat property node. use the RibbonConfigToolBar Items Collection Editor: 57 . Add a C1Ribbon control to the Ribbon Form. You can arrange the items in the QAT MenuItems list using the up and down arrow buttons. In the Properties window.Selecting an item in the Existing Items list and clicking the > button adds the item to the QAT MenuItems list. click on the (Collection) next to the MenuItems property. Configuration Toolbar Collection Editor The RibbonConfigToolBar Items Collection Editor allows you to add Ribbon items to the configuration toolbar or remove Ribbon items from the configuration toolbar. Click the C1Ribbon control to activate it. To edit the configuration toolbar. 2. you can edit the item's properties. To access the QAT MenuItems Collection Editor: 1. 3. then click the ellipsis button. The QAT MenuItems Collection Editor appears.

Clicking the Add drop-down button will reveal a drop-down list with the following Ribbon items available to add to the configuration toolbar:                  RibbonButton RibbonCheckBox RibbonColorPicker RibbonComboBox RibbonDatePicker RibbonFontComboBox RibbonLabel RibbonMenu RibbonNumericBox RibbonProgressBar RibbonSeparator RibbonSplitButton RibbonTextBox RibbonTimePicker RibbonToggleButton RibbonTrackBar RibbonControlHost To access the RibbonConfigToolBar Items Collection Editor: 58 .

In the Properties window. The RibbonConfigToolBar Items Collection Editor appears. you can edit the tab's properties. click on the (Collection) next to the Items property. 59 .1. Add a C1Ribbon control to the Ribbon Form. you can edit the group's properties. RibbonGroup Collection Editor The RibbonGroup Collection Editor allows you to add any number of groups to the tab or remove groups from the tab. Click the C1Ribbon control to activate it. 2. click on the (Collection) next to the Tabs property and then click the ellipsis button. In the Properties window. RibbonTab Collection Editor The RibbonTab Collection Editor allows you to add any number of tabs to the Ribbon or remove tabs from the Ribbon. 2. then click the ellipsis button. use the RibbonTab Collection Editor: Clicking the Add button will add tab(s) to the Ribbon. To edit the Ribbon tab(s). The RibbonTab Collection Editor appears. Add a C1Ribbon control to the Ribbon Form. expand the ConfigToolBar property node. To access the RibbonTab Collection Editor: 1. Click the C1Ribbon control to activate it. Additionally. 3. Additionally. 3.

Access the RibbonTab Collection Editor (page 59). click on the ellipsis button next to the Groups property. Click the RibbonTab element to activate it. 2. The RibbonGroup Collection Editor appears. Option 2 1. Add a C1Ribbon control to the Ribbon Form. Accessing the RibbonGroup Collection Editor You can use one of the following two options to access the RibbonGroup Collection Editor: Option 1 1.To edit the Ribbon group(s). In the Properties window. 60 . From the RibbonTab Collection Editor's Properties window. click on the ellipsis button next to the Groups property. 3. use the RibbonGroup Collection Editor: Clicking the Add button will add group(s) to the Ribbon. 2.

use the RibbonGroup Items Collection Editor: 61 .The RibbonGroup Collection Editor appears. To edit the Ribbon item(s). you can edit the item's properties. RibbonGroup Items Collection Editor The RibbonGroup Items Collection Editor allows you to add any number of Ribbon items to the group or remove items from the group. Additionally.

Clicking the Add drop-down button will reveal a drop-down list with the following Ribbon items available to add to the group:                  RibbonButton RibbonCheckBox RibbonColorPicker RibbonComboBox RibbonDatePicker RibbonGallery RibbonFontComboBox RibbonLabel RibbonMenu RibbonNumericBox RibbonProgressBar RibbonSeparator RibbonSplitButton RibbonTextBox RibbonTimePicker RibbonToggleButton RibbonToolBar 62 .

RibbonGalleryItem Collection Editor The RibbonGalleryItem Collection Editor allows you to add any number of items to the gallery or remove items from the gallery. use the RibbonGalleryItem Collection Editor: 63 . To edit the Ribbon gallery item(s). Access the RibbonGroup Collection Editor (page 59). The RibbonGroup Items Collection Editor appears. click on the ellipsis button next to the Items property. Additionally. 3. Click the RibbonGroup element to activate it. 2. 2.  RibbonTrackBar RibbonControlHost Accessing the RibbonGroup Items Collection Editor You can use one of the following two options to access the RibbonGroup Items Collection Editor: Option 1 1. In the group's Properties window. Add a C1Ribbon control to the Ribbon Form. Option 2 1. From the RibbonGroup Collection Editor's Properties window. The RibbonGroup Items Collection Editor appears. click on the ellipsis button next to the Items property. you can edit the item's properties.

2. Option 2 1. Click the gallery element to activate it. Click the Add drop-down button and add a gallery item. In the Properties window. With the RibbonGallery selected in the Members list. click on the ellipsis button next to the Items property in the Properties window. 3. Add a RibbonGallery to the Ribbon group. 2. 64 . 3. Access the RibbonGroup Items Collection Editor (page 61). The RibbonGalleryItem Collection Editor appears. click on the ellipsis button next to the Items property. Accessing the RibbonGalleryItem Collection Editor You can use one of the following two options to access the RibbonGalleryItem Collection Editor: Option 1 1.Clicking the Add button will add gallery item(s) to the Ribbon.

To edit the Ribbon gallery menu item(s). use the RibbonGallery Menu Items Collection Editor: 65 .The RibbonGalleryItem Collection Editor appears. you can edit the item's properties. Additionally. RibbonGallery Menu Items Collection Editor The RibbonGallery Menu Items Collection Editor allows you to add any number of menu items to the bottom of the drop-down portion of the gallery or remove menu items from the bottom of the drop-down portion of the gallery.

Click the gallery element to activate it.Clicking the Add drop-down button will reveal a drop-down list with the following Ribbon items available to add to the drop-down portion of the gallery:          RibbonButton RibbonColorPicker RibbonColorPickerItem RibbonComboBox RibbonLabel RibbonMenu RibbonSeparator RibbonSplitButton RibbonToggleButton Accessing the RibbonGallery Menu Items Collection Editor You can use one of the following two options to access the RibbonGallery Menu Items Collection Editor: Option 1 1. 2. 3. In the Properties window. click on the ellipsis button next to the MenuItems property. Add a RibbonGallery to the Ribbon group. Access the RibbonGroup Items Collection Editor (page 61). Option 2 1. The RibbonGallery Menu Items Collection Editor appears. 66 .

3. Additionally. With the RibbonGallery selected in the Members list. you can edit the item's properties. RibbonToolBar Items Collection Editor The RibbonToolBar Items Collection Editor allows you to add any number of Ribbon items to the toolbar or remove items from the toolbar. The RibbonGallery Menu Items Collection Editor appears. use the RibbonToolBar Items Collection Editor: 67 . click on the ellipsis button next to the MenuItems property in the Properties window.2. Click the Add drop-down button and add a gallery item. To edit the Ribbon item(s).

click on the ellipsis button next to the Items property. 68 . 3.Clicking the Add drop-down button will reveal a drop-down list with the following Ribbon items available to add to the toolbar:            RibbonButton RibbonCheckBox RibbonColorPicker RibbonComboBox RibbonFontComboBox RibbonLabel RibbonMenu RibbonSeparator RibbonSplitButton RibbonTextBox RibbonToggleButton Accessing the RibbonToolBar Items Collection Editor You can use one of the following two options to access the RibbonToolBar Items Collection Editor: Option 1 1. Add a RibbonToolBar to the Ribbon group. Click the toolbar element to activate it. In the Properties window. 2.

Additionally. Access the RibbonGroup Items Collection Editor (page 61). With the RibbonToolBar selected in the Members list. click on the ellipsis button next to the Items property in the Properties window. To edit the Ribbon item(s). use the RibbonMenu Items Collection Editor: 69 . RibbonMenu Items Collection Editor The RibbonMenu Items Collection Editor allows you to add any number of Ribbon items to the menu or remove items from the menu.The RibbonToolBar Items Collection Editor appears. Click the Add drop-down button and add a toolbar item. Option 2 1. 3. you can edit the item's properties. The RibbonToolBar Items Collection Editor appears. 2.

Click the menu element to activate it. 3.Clicking the Add drop-down button will reveal a drop-down list with the following Ribbon items available to add to the menu:          RibbonButton RibbonColorPicker RibbonColorPickerItem RibbonComboBox RibbonLabel RibbonMenu RibbonSeparator RibbonSplitButton RibbonToggleButton Accessing the RibbonMenu Items Collection Editor You can use one of the following two options to access RibbonMenu Items Collection Editor: Option 1 1. In the Properties window. Add a RibbonMenu to the Ribbon group. Access the RibbonGroup Items Collection Editor (page 61). The RibbonMenu Items Collection Editor appears. 2. Option 2 1. 70 . click on the ellipsis button next to the Items property.

2. With the RibbonMenu selected in the Members list. you can edit the item's properties. Additionally. The RibbonMenu Items Collection Editor appears. To edit the Ribbon item(s). use the RibbonComboBox Items Collection Editor: 71 . click on the ellipsis button next to the Items property in the Properties window. RibbonComboBox Items Collection Editor The RibbonComboBox Items Collection Editor allows you to add any number of Ribbon items to the combo box or remove items from the combo box. Click the Add drop-down button and add a menu item. 3.

2. 3. With the RibbonComboBox selected in the Members list. 72 . click on the ellipsis button next to the Items property in the Properties window. Click the combo box element to activate it. The RibbonComboBox Items Collection Editor appears.Clicking the Add drop-down button will reveal a drop-down list with the following Ribbon items available to add to the combo box:   RibbonButton RibbonLabel Accessing the RibbonComboBox Items Collection Editor You can use one of the following two options to access RibbonComboBox Items Collection Editor: Option 1 1. click on the ellipsis button next to the Items property. Access the RibbonGroup Items Collection Editor (page 61). Click the Add drop-down button and add a combo box item. Option 2 1. 2. Add a RibbonComboBox to the Ribbon group. 3. In the Properties window.

The RibbonComboBox Items Collection Editor appears. you can edit the item's properties. use the RibbonComboBox Menu Items Collection Editor: 73 . To edit the Ribbon item(s). Additionally. RibbonComboBox Menu Items Collection Editor The RibbonComboBox Menu Items Collection Editor allows you to add any number of Ribbon menu items to the drop-down portion of the combo box or remove menu items from the drop-down portion of the combo box.

click on the ellipsis button next to the MenuItems property. 74 . 3.Clicking the Add drop-down button will reveal a drop-down list with the following Ribbon items available to add to the drop-down portion of the combo box:         RibbonButton RibbonColorPickerItem RibbonComboBox RibbonLabel RibbonMenu RibbonSeparator RibbonSplitButton RibbonToggleButton Accessing the RibbonComboBox Menu Items Collection Editor You can use one of the following two options to access RibbonComboBox Menu Items Collection Editor: Option 1 1. Click the Add drop-down button and add a combo box item. 2. Access the RibbonGroup Items Collection Editor (page 61). The RibbonComboBox Menu Items Collection Editor appears. In the Properties window. Click the combo box element to activate it. Option 2 1. 2. Add a RibbonComboBox to the Ribbon group.

With the RibbonComboBox selected in the Members list. click on the ellipsis button next to the MenuItems property in the Properties window. To edit the Ribbon item(s). Additionally. you can edit the item's properties. The RibbonComboBox Menu Items Collection Editor appears. use the RibbonFontComboBox Menu Items Collection Editor: 75 . RibbonFontComboBox Menu Items Collection Editor The RibbonFontComboBox Menu Items Collection Editor allows you to add any number of Ribbon menu items to the drop-down portion of the font combo box or remove menu items from the drop-down portion of the font combo box.3.

Click the Add drop-down button and add a font combo box item. 3. click on the ellipsis button next to the MenuItems property. 2. In the Properties window. The RibbonFontComboBox Menu Items Collection Editor appears. Click the font combo box element to activate it. Access the RibbonGroup Items Collection Editor (page 61). Option 2 1.Clicking the Add drop-down button will reveal a drop-down list with the following Ribbon items available to add to the drop-down portion of the font combo box:         RibbonButton RibbonColorPickerItem RibbonComboBox RibbonLabel RibbonMenu RibbonSeparator RibbonSplitButton RibbonToggleButton Accessing the RibbonFontComboBox Menu Items Collection Editor You can use one of the following two options to access RibbonFontComboBox Menu Items Collection Editor: Option 1 1. 76 . 2. Add a RibbonFontComboBox to the Ribbon group.

click on the ellipsis button next to the MenuItems property in the Properties window. use the RibbonSplitButton Items Collection Editor: 77 . The RibbonFontComboBox Menu Items Collection Editor appears. you can edit the item's properties. Additionally. RibbonSplitButton Items Collection Editor The RibbonSplitButton Items Collection Editor allows you to add any number of Ribbon items to the split button or remove items from the split button. To edit the Ribbon item(s). With the RibbonFontComboBox selected in the Members list.3.

Option 2 1. 2. 2. In the Properties window. Click the split button to activate it. Click the Add drop-down button and add a split button. 78 . Add a RibbonSplitButton to the Ribbon group.Clicking the Add drop-down button will reveal a drop-down list with the following Ribbon items available to add to the menu:         RibbonButton RibbonColorPickerItem RibbonComboBox RibbonLabel RibbonMenu RibbonSeparator RibbonSplitButton RibbonToggleButton Accessing the RibbonSplitButton Items Collection Editor You can use one of the following two options to access RibbonSplitButton Items Collection Editor: Option 1 1. click on the ellipsis button next to the Items property. 3. Access the RibbonGroup Items Collection Editor (page 61). The RibbonSplitButton Items Collection Editor appears.

With the RibbonSplitButton selected in the Members list. you can edit the item's properties. use the C1StatusBar LeftPaneItems Collection Editor: 79 . C1StatusBar LeftPaneItems Collection Editor The C1StatusBar LeftPaneItems Collection Editor allows you to add Ribbon items to the left status bar pane or remove Ribbon items from the left status bar pane. To edit the left status bar pane. click on the ellipsis button next to the Items property in the Properties window. The RibbonSplitButton Items Collection Editor appears. Additionally. C1StatusBar provides the following collection editors:   C1StatusBar LeftPaneItems Collection Editor C1StatusBar RightPaneItems Collection Editor The following topics briefly introduce the C1StatusBar collection editors and explain how to access each editor.3. C1StatusBar Collection Editors The main part of the C1StatusBar editor's application consists of a Windows form which conveniently allows you to add status bar pane items and edit their properties.

2. RibbonButton RibbonColorPicker RibbonComboBox RibbonDatePicker RibbonFontComboBox RibbonLabel RibbonMenu RibbonNumericBox RibbonProgressBar RibbonSeparator RibbonSplitButton RibbonTextBox RibbonTimePicker RibbonToggleButton Add a C1StatusBar control to the Ribbon Form.Clicking the Add drop-down button will reveal a drop-down list with the following Ribbon items available to add to the left status bar pane:               1. Click the C1StatusBar control to activate it. RibbonTrackBarTo access the C1StatusBar LeftPaneItems Collection Editor: 80 .

then click the ellipsis button. click on the (Collection) next to the LeftPaneItems property. C1StatusBar RightPaneItems Collection Editor The C1StatusBar RightPaneItems Collection Editor allows you to add Ribbon items to the right status bar pane or remove Ribbon items from the right status bar pane. In Properties window. Additionally.3. The C1StatusBar LeftPaneItems Collection Editor appears. To edit the right status bar pane. you can edit the item's properties. use the C1StatusBar RightPaneItems Collection Editor: Clicking the Add drop-down button will reveal a drop-down list with the following Ribbon items available to add to the right status bar pane:           RibbonButton RibbonColorPicker RibbonComboBox RibbonDatePicker RibbonFontComboBox RibbonLabel RibbonMenu RibbonNumericBox RibbonProgressBar RibbonSeparator 81 .

you can set properties directly on the form. RibbonSplitButton RibbonTextBox RibbonTimePicker RibbonToggleButton RibbonTrackBar Add a C1StatusBar control to the Ribbon Form. When you mouse over an item on the Ribbon. Clicking the item reveals a floating toolbar. RibbonTrackBarTo access the C1StatusBar RightPaneItems Collection Editor: C1Ribbon Smart Designer C1Ribbon provides visual editing to make it easier to create a Ribbon. 3. The C1StatusBar RightPaneItems Collection Editor appears. Click the C1StatusBar control to activate it. a tab at the lower left side of the form appears indicating what item the mouse is over. 2. click on the (Collection) next to the RightPaneItems property. In Properties window. Some items also provide directions directly on the form on how to customize the item. 82 . then click the ellipsis button.     1. Using the smart designer.

modify the text settings. modify the text settings. and disable/enable the item. Application menu floating toolbar: The Application menu's floating toolbar allows you to change the Application button's image and enable or disable the menu. You can also add the combo box to the QAT and hot list. and Add Launcher Button / Remove Launcher Button. add a tab. as well as disable/enable the item. add the button to the QAT. and text properties. Label floating toolbar: The label's floating toolbar allows you to change the image. add Ribbon items. and add the button to hot list. Button floating toolbar: The button's floating toolbar allows you to change the image. max text length. modify the text settings. modify the text settings. disable/enable the item. set the text area width. Tab floating toolbar: The tab's floating toolbar allows you to add a group. modify the text settings. change the image. Color Picker floating toolbar: The color picker's floating toolbar allows you to change the image. set the text area width. and disable/enable the gallery. Gallery floating toolbar: The gallery's floating toolbar allows you to change the image. You can also add the check box to the QAT and hot list. and disable/enable the item. modify the text settings. and disable/enable the item. open the tree-based designer.The smart designer consists of the following floating toolbars: Floating Toolbar Description Ribbon floating toolbar: The Ribbon's floating toolbar allows you to load and save a template. Combo Box floating toolbar: The combo box's floating toolbar allows you to change the image. You can also add the group to the QAT and hot list. Group floating toolbars: The group's floating toolbar allows you to load and save a group template. max text length. 83 . and text properties. and set the visual style of the Ribbon. Edit Box floating toolbar: The edit box's floating toolbar allows you to change the image. Check Box floating toolbar: The check box's floating toolbar allows you to change the image. and disable/enable the item. and disable/enable the color picker. You can also add the color picker to the QAT and hot list. Clicking the caption area of the group reveals the floating toolbar which enables you to modify text settings. as well as disable/enable the item. modify the text settings. modify the text settings.

modify the text settings. Hide/show Ribbon items: Add or remove Ribbon items. click the button. and add tabs. modify the text settings. You can also add the menu item to the QAT and hot list. You can also add the toggle button to the QAT and hot list. 84 . paste. and disable/enable the item. To close the floating toolbar. and disable/enable the item. You can also add the menu item to the QAT. or delete the item. click the button that appears in the upper-left corner of the form. Ribbon Floating Toolbar The Ribbon's floating toolbar is the only floating toolbar that will appear on the form regardless of the item the mouse is positioned over. The Ribbon's floating toolbar consists of the following buttons: Actions: Load and save templates. Toggle Group floating toolbar: The toggle group's floating toolbar allows you to add a toggle button(s) and disable/enable the item.Menu floating toolbar: The menu's floating toolbar allows you to change the image. To display the main Ribbon floating toolbar. Toolbar floating toolbar: The toolbar's floating toolbar allows you to add Ribbon items and disable/enable the item. modify the text settings. Change Ribbon's visual style: Edit the Ribbon's visual style. Split Button floating toolbar: The split button's floating toolbar allows you to change the image. and disable/enable the item. You can also add the split button to the QAT and hot list. copy. Separator floating toolbar: The separator's floating toolbar allows you to cut. Toggle Button floating toolbar: The toggle button's floating toolbar allows you to change the image.

Actions Clicking the Actions button opens a list of available actions. you can easily select or deselect existing items on the Ribbon to hide them or show them. Hide/show Ribbon items Clicking the Hide/Show Ribbon Items button opens the Hide/Show Ribbon Items designer. Visual Style Clicking the Change Ribbon's Visual Style button opens the Visual Style dialog box. The Load Ribbon/Save Ribbon Template feature allows end users to create a collection of ready-to-use templates for the Ribbon. Here you can change the visual style of the Ribbon to Office2007Black or Office2007Silver (or keep its default Office2007Blue style). In the designer.Localize: Opens the Localize dialog box. 85 .

and Cut. you can enable the menu (checked by default) or disable the menu (unchecked). Miscellaneous settings: Enable or disable the menu. Tab Floating Toolbar The tab's floating toolbar allows you to add groups. modify the text settings. change the image. Miscellaneous settings Clicking the Miscellaneous settings button opens the Miscellaneous dialog box. Copy. or Delete the tab. You can click the Import button to browse for a custom image or you can click the Select Image drop-down arrow to select from a list of large (32x32) or small (16x16) preset images. Change Image Clicking the Change Image button opens the Change Image dialog box. In the Miscellaneous dialog box. The tab's floating toolbar consists of the following buttons: Actions: Add groups. and disable/enable the item.Application Menu Floating Toolbar The Application menu's floating toolbar allows you to change the Application menu's image and enable or disable the menu. 86 . The tab's floating toolbar consists of the following buttons: Change Image: Edit image. Paste.

Text settings Clicking the Text settings button opens the Text Settings dialog box. Change Image Clicking the Change Image button opens the Change Image dialog box. Miscellaneous settings: Enable or disable the tab. You can click the Import button to browse for a custom 16x16 image or you can click the Select Image drop-down arrow to select from a list of preset 16x16 images. Text settings: Edit Text and ToolTip properties. Actions Clicking the Actions button opens a list of available actions. In the Text Settings dialog box. you can edit the tab's Text and ToolTip properties.Change Image: Edit image. 87 .

Add Launcher Button / Remove Launcher Button: Add or remove a dialog box launcher button to the group.Miscellaneous settings Clicking the Miscellaneous settings button opens the Miscellaneous dialog box. and add Ribbon items to the group. and disable/enable the group. Paste. The Load Group/Save Group Template feature allows the end users to create a collection of ready-to-use templates for control groups. you can enable the tab (checked by default) or disable the tab (unchecked). 88 . add Ribbon items. Group Floating Toolbar The group's floating toolbar allows you to load and save a group template. Text settings: Edit Text and ToolTip properties. Copy. Miscellaneous settings: Enable or disable the group. Actions Clicking the Actions button opens a list of available actions. The group's floating toolbar consists of the following buttons: Actions: Cut. load and save group templates. You can also add the group to the QAT and hot list. In the Miscellaneous dialog box. Add to Hot Item List: Add the group to the hot item list. Add to Quick Access Toolbar: Add the group to the QAT. or Delete the group.

you can edit the group's Text and ToolTip properties. In the Miscellaneous dialog box. In the Text Settings dialog box. 89 . you can enable the group (checked by default) or disable the group (unchecked). Text settings Clicking the Text settings button opens the Text Settings dialog box.Miscellaneous settings Clicking the Miscellaneous settings button opens the Miscellaneous dialog box.

The button's floating toolbar consists of the following buttons: Actions: Cut. modify the text settings. Add to Hot Item List: Add the button to the hot item list. which allows you to remove the Ribbon group from the QAT. . After clicking button switches to Add to Hot Item List Clicking the Add to Hot Item List button adds the Ribbon group to the hot item list. Paste. After clicking remove the Ribbon group from the hot list. Copy. the Button Floating Toolbar The button's floating toolbar allows you to change the image.Add Launcher Button / Remove Launcher Button Clicking the Add Launcher Button will add a dialog launcher button to the group. clicking the Remove Launcher Button will remove the dialog launcher button from the group. Actions Clicking the Actions button opens a list of available actions. and ToolTip properties. Add to Quick Access Toolbar Clicking the Add to Quick Access Toolbar button adds the Ribbon group to the QAT. Add to Quick Access Toolbar: Add the button to the QAT. Text settings: Edit Text. or Delete the item. Miscellaneous settings: Enable or disable the button. You can also add the button to the QAT and hot list. the button switches to . Description. With the dialog launcher button added to the group. 90 . which is available by clicking the drop-down arrow adjacent to the QAT. Change Image: Edit image and image size. . which allows you to . and disable/enable the button.

In the Miscellaneous dialog box. and ToolTip. You can click the Import button to browse for a custom image or you can click the Select Image drop-down arrow to select from a list of large (32x32) or small (16x16) preset images. 91 .Change Image Clicking the Change Image button opens the Change Image dialog box. Description. Text settings Clicking the Text settings button opens the Text Settings dialog box. including the Text. Note that you also have the option to place the image above the text (default for the large image). you can edit the button's text. you can enable the button (checked by default) or disable the button (unchecked). Miscellaneous settings Clicking the Miscellaneous settings button opens the Miscellaneous dialog box. In the Text Settings dialog box.

After clicking button switches to Add to Hot Item List Clicking the Add to Hot Item List button adds the Ribbon button to the hot item list. Description. The check box's floating toolbar consists of the following buttons: Actions: Cut. and disable/enable the check box. which is available by clicking the drop-down arrow adjacent to the QAT. Actions Clicking the Actions button opens a list of available actions. Copy. the button switches to .Add to Quick Access Toolbar Clicking the Add to Quick Access Toolbar button adds the Ribbon button to the QAT. which allows . Change Image: Edit image. Change Image 92 . or Delete the item. and ToolTip properties. Add to Hot Item List: Add the check box to the hot item list. After clicking you to remove the Ribbon button from the hot list. . Paste. Text settings: Edit Text. which allows you to remove the Ribbon button from the QAT. the Check Box Floating Toolbar The check box's floating toolbar allows you to change the image. Add to Quick Access Toolbar: Add the check box to the QAT. Miscellaneous settings: Enable or disable the check box. You can also add the check box to the QAT and hot list. . modify the text settings.

including the Text. and ToolTip. After clicking switches to .Clicking the Change Image button opens the Change Image dialog box. . Add to Quick Access Toolbar Clicking the Add to Quick Access Toolbar button adds the check box to the QAT. Miscellaneous settings Clicking the Miscellaneous settings button opens the Miscellaneous dialog box. the button Add to Hot Item List 93 . you can enable the check box (checked by default) or disable the check box (unchecked). you can edit the check box's text. Text settings Clicking the Text settings button opens the Text Settings dialog box. which allows you to remove the check box from the QAT. Description. In the Miscellaneous dialog box. You can click the Import button to browse for a custom 16x16 image or you can click the Select Image drop-down arrow to select from a list of preset 16x16 images. In the Text Settings dialog box.

Miscellaneous settings: Enable or disable the color picker. Paste. After clicking remove the check box from the hot list. which is available by clicking the drop-down arrow adjacent to the QAT. or Delete the item. Text settings: Edit Text. . Note that you also have the option to place the image above the text (default for the large image). and ToolTip properties.Clicking the Add to Hot Item List button adds the check box to the hot item list. Description. Change Image Clicking the Change Image button opens the Change Image dialog box. Actions Clicking the Actions button opens a list of available actions. which allows you to Color Picker Floating Toolbar The color picker's floating toolbar allows you to change the image. the button switches to . 94 . The color picker's floating toolbar consists of the following buttons: Actions: Cut. You can also add the color picker to the QAT and hot list. Copy. You can click the Import button to browse for a custom image or you can click the Select Image drop-down arrow to select from a list of large (32x32) or small (16x16) preset images. Add to Quick Access Toolbar: Add the color picker to the QAT. and disable/enable the color picker. modify the text settings. Change Image: Edit image. Add to Hot Item List: Add the color picker to the hot item list.

the 95 . you can enable the color picker (checked by default) or disable the color picker (unchecked). .Text settings Clicking the Text settings button opens the Text Settings dialog box. you can edit the check box's text. Add to Quick Access Toolbar Clicking the Add to Quick Access Toolbar button adds the color picker to the QAT. After clicking button switches to Add to Hot Item List . Description. In the Miscellaneous dialog box. including the Text. Miscellaneous settings Clicking the Miscellaneous settings button opens the Miscellaneous dialog box. In the Text Settings dialog box. which allows you to remove the color picker from the QAT. and ToolTip.

max text length. which is available by clicking the drop-down arrow adjacent to the QAT. Text settings: Edit Text Description. which allows you to Combo Box Floating Toolbar The combo box's floating toolbar allows you to change the image. Paste. Miscellaneous settings: Set the text area width. the button switches to . Add to Hot Item List: Add the combo box to the hot item list. set the text area width. as well as enable or disable the combo box. max text length. and text properties. Add to Quick Access Toolbar: Add the combo box to the QAT. modify the text settings. Change Image Clicking the Change Image button opens the Change Image dialog box. You can click the Import button to browse for a custom 16x16 image or you can click the Select Image drop-down arrow to select from a list of preset 16x16 images. Actions Clicking the Actions button opens a list of available actions. The combo box's floating toolbar consists of the following buttons: Actions: Cut. You can also add the combo box to the QAT and hot list. 96 . Change Image: Edit image. . and text properties. After clicking remove the color picker from the hot list. as well as disable/enable the combo box. or Delete the item. and ToolTip properties.Clicking the Add to Hot Item List button adds the color picker to the hot item list. Copy.

Miscellaneous settings Clicking the Miscellaneous settings button opens the Miscellaneous dialog box. After clicking remove the combo box from the hot list.Text settings Clicking the Text settings button opens the Text Settings dialog box. the button switches to . which is available by clicking the drop-down arrow adjacent to the QAT. After clicking switches to . Additionally. and ToolTip. including the Text. which allows you to remove the combo box from the QAT. you can edit the combo box's text properties. Description. Add to Quick Access Toolbar Clicking the Add to Quick Access Toolbar button adds the combo box to the QAT. In the Text Settings dialog box. max text length. . and text properties. you can set the text area width. . In the Miscellaneous dialog box. you can enable the combo box (checked by default) or disable the combo box (unchecked). the button Add to Hot Item List Clicking the Add to Hot Item List button adds the combo box to the hot item list. which allows you to 97 .

Miscellaneous settings: Set the text area width. and text properties. The edit box's floating toolbar consists of the following buttons: Actions: Cut. Change Image: Edit image. set the text area width. max text length. modify the text settings. Text settings Clicking the Text settings button opens the Text Settings dialog box. 98 . or Delete the item. You can click the Import button to browse for a custom 16x16 image or you can click the Select Image drop-down arrow to select from a list of preset 16x16 images. Description. Copy. and text properties. Paste.Edit Box Floating Toolbar The edit box's floating toolbar allows you to change the image. you can edit the edit box's text properties. Change Image Clicking the Change Image button opens the Change Image dialog box. and ToolTip. as well as enable or disable the edit box. as well as disable/enable the edit box. In the Text Settings dialog box. and ToolTip properties. max text length. including the Text. Description. Actions Clicking the Actions button opens a list of available actions. Text settings: Edit Text.

modify the text settings. max text length. Actions Clicking the Actions button opens a list of available actions. you can set the text area width. Change Image: Edit image. and text properties. Additionally. Text settings: Edit Text. and disable/enable the gallery. Copy. The gallery's floating toolbar consists of the following buttons: Actions: Cut. Description. and ToolTip properties. you can enable the edit box (checked by default) or disable the edit box (unchecked). 99 . Paste.Miscellaneous settings Clicking the Miscellaneous settings button opens the Miscellaneous dialog box. Miscellaneous settings: Enable or disable the gallery. or Delete the item. Gallery Floating Toolbar The gallery's floating toolbar allows you to change the image. In the Miscellaneous dialog box.

Note that you also have the option to place the image above the text (default for the large image). 100 . including the Text. you can edit the gallery's text. and ToolTip.Change Image Clicking the Change Image button opens the Change Image dialog box. In the Miscellaneous dialog box. Miscellaneous settings Clicking the Miscellaneous settings button opens the Miscellaneous dialog box. Description. Text settings Clicking the Text settings button opens the Text Settings dialog box. In the Text Settings dialog box. you can enable the gallery (checked by default) or disable the gallery (unchecked). You can click the Import button to browse for a custom image or you can click the Select Image drop-down arrow to select from a list of large (32x32) or small (16x16) preset images.

Miscellaneous settings: Enable or disable the label. Paste. Text settings: Edit Text. modify the text settings. Change Image Clicking the Change Image button opens the Change Image dialog box. Actions Clicking the Actions button opens a list of available actions.Label Floating Toolbar The label's floating toolbar allows you to change the image. Description. Change Image: Edit image. and disable/enable the label. or Delete the item. Text settings 101 . and ToolTip properties. The label's floating toolbar consists of the following buttons: Actions: Cut. You can click the Import button to browse for a custom 16x16 image or you can click the Select Image drop-down arrow to select from a list of preset 16x16 images. Copy.

modify the text settings. Text settings: Edit Text. Add to Quick Access Toolbar: Add the menu item to the QAT. Miscellaneous settings Clicking the Miscellaneous settings button opens the Miscellaneous dialog box. Change Image: Edit image and image size. In the Miscellaneous dialog box. In the Text Settings dialog box. Description. Description. and disable/enable the menu. Actions Clicking the Actions button opens a list of available actions. you can enable the label (checked by default) or disable the label (unchecked). you can edit the label's text properties. including the Text.Clicking the Text settings button opens the Text Settings dialog box. Add to Hot Item List: Add the menu item to the hot item list. Menu Floating Toolbar The menu's floating toolbar allows you to change the image. Paste. Copy. Miscellaneous settings: Enable or disable the menu item. and ToolTip. 102 . or Delete the menu item. The menu's floating toolbar consists of the following buttons: Actions: Cut. and ToolTip properties. You can also add the menu item to the QAT and hot list.

Description. In the Miscellaneous dialog box. Text settings Clicking the Text settings button opens the Text Settings dialog box. In the Text Settings dialog box. 103 . you can edit the menu's text properties.Change Image Clicking the Change Image button opens the Change Image dialog box. Note that you also have the option to place the image above the text (default for the large image). You can click the Import button to browse for a custom image or you can click the Select Image drop-down arrow to select from a list of large (32x32) or small (16x16) preset images. including the Text. Miscellaneous settings Clicking the Miscellaneous settings button opens the Miscellaneous dialog box. you can enable the menu (checked by default) or disable the menu (unchecked). and ToolTip.

Copy. . Copy. The split button's floating toolbar consists of the following buttons: Actions: Cut.Add to Quick Access Toolbar Clicking the Add to Quick Access Toolbar button adds the menu item to the QAT. Paste. The separator floating toolbar consists of the following buttons: Actions: Cut. After clicking remove the menu item from the hot list. modify the text settings. After clicking switches to . Split Button Floating Toolbar The split button's floating toolbar allows you to change the image. paste. or Delete the item. You can also add the split button to the QAT and hot list. Add to Quick Access Toolbar: Add the menu item to the QAT. 104 . the button Add to Hot Item List Clicking the Add to Hot Item List button adds the menu item to the hot item list. the button switches to . Actions Clicking the Actions button opens a list of available actions. which is available by clicking the drop-down arrow adjacent to the QAT. Change Image: Edit image and image size. which allows you to Separator Floating Toolbar The separator's floating toolbar allows you to cut. which allows you to remove the menu item from the QAT. and disable/enable the split button. Paste. or Delete the item. or delete the item. copy. .

you can edit the split button's text properties. Change Image Clicking the Change Image button opens the Change Image dialog box. Text settings Clicking the Text settings button opens the Text Settings dialog box. In the Text Settings dialog box. and ToolTip. Actions Clicking the Actions button opens a list of available actions. including the Text. Add to Quick Access Toolbar: Add the split button to the QAT. Description. and ToolTip properties. Note that you also have the option to place the image above the text (default for the large image). Description.Text settings: Edit Text. You can click the Import button to browse for a custom image or you can click the Select Image drop-down arrow to select from a list of large (32x32) or small (16x16) preset images. Add to Hot Item List: Add the split button to the hot item list. Miscellaneous settings: Enable or disable the split button. 105 .

The toggle button's floating toolbar consists of the following buttons: Actions: Cut. and ToolTip properties. Text settings: Edit Text. Change Image: Edit image and image size. which is available by clicking the drop-down arrow adjacent to the QAT. Copy. and disable/enable the toggle button. Add to Quick Access Toolbar Clicking the Add to Quick Access Toolbar button adds the split button to the QAT. which allows you to Toggle Button Floating Toolbar The toggle button's floating toolbar allows you to change the image. the button Add to Hot Item List Clicking the Add to Hot Item List button adds the split button to the hot item list. After clicking remove the split button from the hot list. modify the text settings. Miscellaneous settings: Enable or disable the toggle button. You can also add the toggle button to the QAT and hot list. After clicking switches to . or Delete the item. the button switches to . you can enable the split button (checked by default) or disable the split button (unchecked).Miscellaneous settings Clicking the Miscellaneous settings button opens the Miscellaneous dialog box. Paste. In the Miscellaneous dialog box. which allows you to remove the split button from the QAT. Description. . 106 . .

Text settings Clicking the Text settings button opens the Text Settings dialog box. including the Text. you can edit the toggle button's text properties. Note that you also have the option to place the image above the text (default for the large image). Change Image Clicking the Change Image button opens the Change Image dialog box. 107 . In the Text Settings dialog box. Add to Hot Item List: Add the split button to the hot item list. You can click the Import button to browse for a custom image or you can click the Select Image drop-down arrow to select from a list of large (32x32) or small (16x16) preset images.Add to Quick Access Toolbar: Add the split button to the QAT. Actions Clicking the Actions button opens a list of available actions. and ToolTip. Description.

Additionally. which allows you to . the Toggle Group Floating Toolbar The toggle group's floating toolbar allows you to add a toggle button. you can enable the toggle button (checked by default) or disable the toggle button (unchecked). modify the text settings. or Delete the item. and disable/enable the toggle group. the button switches to . you can select the Pressed checkbox to show the toggle button as pressed (orange background). Actions Clicking the Actions button opens a list of available actions.Miscellaneous settings Clicking the Miscellaneous settings button opens the Miscellaneous dialog box. To enable the toggle group's floating toolbar click the glyph in the upperleft corner of the item. Paste. which allows you to remove the toggle button from the QAT. change the image. Copy. In the Miscellaneous dialog box. which is available by clicking the drop-down arrow adjacent to the QAT. . Miscellaneous settings: Enable or disable the toggle group. Add to Quick Access Toolbar Clicking the Add to Quick Access Toolbar button adds the toggle button to the QAT. . After clicking button switches to Add to Hot Item List Clicking the Add to Hot Item List button adds the toggle button to the hot item list. 108 . and Cut. The toggle group's floating toolbar consists of the following buttons: Actions: Add a toggle button. After clicking remove the toggle button from the hot list.

you can enable the toggle group (checked by default) or disable the toggle group (unchecked). Paste. In the Miscellaneous dialog box. To enable the item's floating toolbar click the glyph in the upper-left corner of the item. and add Ribbon items to the toolbar. Toolbar Floating Toolbar The Ribbon toolbar's floating toolbar allows you to add Ribbon items and disable/enable the Ribbon toolbar. The Ribbon toolbar floating toolbar consists of the following buttons: Actions: Cut. Actions Clicking the Actions button opens a list of available actions.Miscellaneous settings Clicking the Miscellaneous settings button opens the Miscellaneous dialog box. Miscellaneous settings: Enable or disable the Ribbon toolbar. or Delete the toolbar. Copy. 109 .

you can enable the Ribbon toolbar (checked by default) or disable the Ribbon toolbar (unchecked).Miscellaneous settings Clicking the Miscellaneous settings button opens the Miscellaneous dialog box. In the Miscellaneous dialog box. 110 . a tab at the lower left side of the form appears indicating what item the mouse is over. Using the smart designer. you can add items to the status bar directly on the form. When you mouse over the C1StatusBar control. C1StatusBar Smart Designer The C1StatusBar provides visual editing to make it easier to create a status bar.

Actions Clicking the Actions button opens a list of available actions. To enable the item's floating toolbar click the glyph in the upper-left corner of the left pane. 111 . The LeftPaneItems' floating toolbar consists of the following button: Actions: Add status bar items to the C1StatusBar control's left pane. RightPaneItems floating toolbar: The RightPaneItems' floating toolbar allows you to add items to the right pane of the status bar.Clicking the item reveals the following floating toolbars: Floating Toolbar Description LeftPaneItems floating toolbar: The LeftPaneItems' floating toolbar allows you to add items to the left pane of the status bar. LeftPaneItems Floating Toolbar The LeftPaneItems' floating toolbar allows you to add status bar items to the C1StatusBar control's left pane.

112 . Actions Clicking the Actions button opens a list of available actions.RightPaneItems Floating Toolbar The RightPaneItems' floating toolbar allows you to add status bar items to the C1StatusBar control's right pane. To enable the item's floating toolbar click the glyph in the upper-left corner of the right pane. The RightPaneItems' floating toolbar consists of the following button: Actions: Add status bar items to the C1StatusBar control's right pane.

The tab's text is ready to be edited. Accessing the ToolTip Editor To open the ToolTip Editor. the tab for example. to highlight it. Home. and RibbonItems. Enter a new tab name. complete the following steps: 1. Press ENTER or click outside the editing box to accept the change. 2. RibbonGroups. To use this feature. ToolTip Editor The ToolTip Editor is used to create rich ToolTips for RibbonTabs. RibbonTab. 3. Select the C1Ribbon element's text. Select the RibbonGroup.In-Place Text Editing To edit the C1Ribbon element's label you can simply click on the text with your mouse pointer to highlight the text and then type in the appropriate text. for example. or RibbonItem you wish to add the ToolTip to. 113 . follow these steps: 1.

on the left side of the dialog box. graphics. source. 114 . HTML.Office. HTML. On the right side of the editor is a Preview pane. ) button. Any additions or changes you make to your ToolTip under the Office tab will be reflected in the Preview pane. In the Properties window. you will find three tabs . saving you time and effort. and Properties tab pages. or properties of a ToolTip. and separator lines to your ToolTip. which provides a real-time preview of the ToolTip. locate the ToolTip property and press its ellipsis ( Editor appears.2. The editor automatically creates all of the HTML code behind the ToolTip. The ToolTip ToolTip Editor Layout When the ToolTip Editor opens. and Properties . Office Tab The Office tab page is used to add content. The following topics will detail the Office. Each tab page features an editor where you can alter the content.

Places a horizontal rule beneath the the body text. it is bold by default. This image will appear beneath the body text of the ToolTip. The horizontal rule is a dark grey. By default. it will appear on the left-hand side. The subtitle element appears at the bottom of the ToolTip. By default. When creating a ToolTip under the Html tab. it is where the description and/or instructions for the tool appear. Places a horizontal rule beneath the title and/or image. The horizontal rule is a dark grey. or you can code by hand in the HTML editor window. This will appear beneath the title and above the subtitle. you have more control over the design of the ToolTip. The body text holds the main content of the ToolTip. it will appear on the left-hand side. 115 . You can use the command buttons to add markup tags to your project. This image will appear over the body text of the ToolTip. Any changes you make to your ToolTip under the Html tab will be reflected in the Preview pane. The Html tab page consists of a toolbar of command buttons and an HTML editor window. Bottom Separator Subtitle Subimage Html Tab The Html tab page is used to add or modify the content of your ToolTip.The following table describes the elements of the Office editor: Element Title Image Top Separator Body Text Description The title element appears at the top of the ToolTip.

Adds HTML tags for a bulleted list (<ul><li></li></ul>) to the HTML editor. Copies selected content from the HTML editor window to the clipboard. Adds HTML tags for bold text (<b></b>) around selected text. Adds HTML tags for numbered list (<ol><li></li></ol> to the HTML editor. 116 . Adds HTML tags for italicized text (<i></i>) around selected text. Inserts an image into the tooltip using HTML tags (<img src = img. Pastes clipboard conent to the HTML editor window. Adds HTML tags for underlined text (<u></u>) around selected text.gif>).The following table provides descriptions for all of the command buttons under the Html tab: Button Name Cut Copy Paste Bold Italics Underline Bulleted List Numbered List Insert Image Description Removes selected content from the HTML editor window and places it on the clipboard.

Tile. Sets whether a fade effect should be used when displaying a tooltip. Sets whether or not the ToolTip window will display a dropshadow. the ToolTip will resemble a dialogue bubble in a comic strip. Sets whether or not the ToolTip window will have rounded corners. Center. Sets the background image layout to None (default). If this is set to True. Sets whether the ToolTip window should display a solid border. The following table provides a list of properties that affect the appearance of a ToolTip: Property BackColor BackgroundImage BackgroundImageLayout Border BorderColor Font ForeColor Images IsBalloon RoundedCorners Shadow StripAmpersands UseFading Description Sets background color of the ToolTip window. Many of the changes that you make to the ToolTip properties will be displayed in the Preview pane. Sets the background image displayed in the ToolTip window.Properties Tab Within the Properties tab page is the Properties grid. Gets a collection of images that may be shown in the ToolTips. Stretch. Sets whether or not the ToolTip is shown in a balloon shape. which is used to customize the appearance and behavior of your ToolTips. Sets the color of the ToolTip window border. Sets the default font used within the ToolTip. Sets the foreground color of the ToolTip window. 117 . or TileStretch. Sets whether ampersands in the text should be displayed or hidden. Zoom.

Sets a value indicating whether a ToolTip window is displayed even when its parent control is not active. C1Ribbon will adopt the cleaner. Sets the maximum width of the ToolTip. more efficient Windows Aero interface. see the Changing the Visual Style (page 158) topic. Once this is done. C1Ribbon provides Office 2007/2010 and Windows 7 themes and over 700 stock images for Ribbon items. Sets the time that passes before the ToolTip. Eliminate the need to start from scratch again! Visual Styles Change C1Ribbon'’s visual style by selecting one of the preset Office-inspired and Windows-inspired styles. ShowAlways Ribbon Appearance C1Ribbon is designed to make customization easy for you. more powerful. Sets the period of time (in milliseconds) that the aToolTip will remain visible if the mouse pointer is stationary. Sets the length of time that must transpire before subsequent ToolTips appear as the mouse pointer moves from one control to another. Visual Style Name Office2007Black Image 118 . Sets the automatic delay for the rich ToolTip.The following table provides a list of properties that affect the behavior of a ToolTip: Property Active AutomaticDelay AutoPopDelay InitialDelay MaximumWidth ReshowDelay Description Sets a value indicating whether or not the ToolTip is currently active. Save the Ribbon layout as an XML file and load the XML file for future usage with the Save/Load Template feature. To learn how to change the visual style.

Office2007Blue (default) Office2007Silver Office2010Black 119 .

You can display a small image for the Ribbon tab.Office2010Blue Office2010Silver Windows7 Images for Ribbon Items C1Ribbon offers large (32x32) and small (16x16) preset images for the Ribbon items as well as the option to import custom images. The Ribbon items can display small or large images. 120 .

and click the second drop-down arrow to reveal the list of predefined small images. complete the following steps: 1. complete the following steps: 1. 2. In the group's Properties window. the following options are available: Note: The following tasks assume that you have added C1Ribbon control to your Ribbon Form and added a Ribbon item (for example. for example. Locate the RibbonItem. complete the following steps: 1. Click the Small Image (16x16) drop-down arrow and select the Bold image. Click the Change Image button .To change the Ribbon item's image. for example. the toggle button to activate it and reveal its properties in the Properties window. the toggle button is highlighted in the Members list: 121 . 2. click the drop-down arrow. 3. Select Bold. Using the Smart Designer To add an image to the Ribbon item using the smart designer. The Change Image dialog box appears. a toggle button) to the group. Click the Ribbon item. Using the Properties Window To add an image to the Ribbon item using the Properties window. Using the Collection Editor To add an image to the Ribbon item using the RibbonGroup Items Collection Editor. Click the Ribbon item. For this example. The editor shows a list of Members and the available properties for each selected member.SmallImage property. Clicking the group activates it. The RibbonGroup Items Collection Editor appears. Click the group that contains the toggle button item. the toggle button to activate it and enable the toggle button's floating toolbar: 2. 3. click on the ellipsis button next to the Items property.

122 .3.SmallImage property. and then click the second dropdown arrow to reveal the list of predefined small images. click the drop-down arrow. Locate the RibbonItem.

Instead of creating a new Ribbon with these groups from scratch for each application. 4. Click the Ribbon to enable the Ribbon's floating toolbar. Select Bold. Click the Actions drop-down button. Create a Ribbon group (page 140) and add Ribbon items to the group (page 143).4. From the list. Select Load StatusBar Template from the menu: 123 . From the list. 5. Enter the XML's name in the File name text box and browse to the save location for the XML. Click the Ribbon to enable the Ribbon's floating toolbar. Load StatusBar Template To load a status bar template. complete the following steps: 1. 2. The Save Ribbon Template dialog box appears. Save Ribbon Template To save a Ribbon template. 6. Click the Actions drop-down button. select Load Ribbon Template. Click Open. 3. 2. Browse to the location of the XML. select Save Ribbon Template. The Load Ribbon Template dialog box appears. The template loads the Ribbon. XML Serialization of the Ribbon Layout The Load/Save Template feature allows end users to create a collection of ready-to-use templates for tabs and control groups. 4. Load Ribbon Template To import an existing XML file to the Ribbon. Then you can quickly import the XML and add the code to handle the commands. Click Save. 6. 3. Click the C1StatusBar smart tag ( ) to enable the C1StatusBar Tasks menu. 2. complete the following steps: 1. you can save the tabs and control groups as XML files and reuse them later. many applications are likely to have the Clipboard and Font groups. Add the code to handle the commands. complete the following steps: 1. 5. For example.

complete the following steps: 1. 5. Click Open. Add status bar items (page 154) to the status bar. Click the C1StatusBar smart tag ( ) to enable the C1StatusBar Tasks menu.3. Save StatusBar Template To save a status bar template. 4. The Save StatusBar Template dialog box appears. 3. Click Save. 5. 124 . Select Save StatusBar Template from the menu: 4. The Load StatusBar Template dialog box appears. Enter the XML's name in the File name text box and browse to the save location for the XML. 2. Add code to handle the commands. The template loads the status bar items. Browse to the location of the XML.

For example. For example. click the Home tab. click Minimize the Ribbon. To use the Ribbon while it is minimized. See the following topics for details on interacting with the Ribbon at run time. From the drop-down list.Run-Time Interaction At run time. 2. you can make some tabs visible only when they are needed. To make more space available. you can select text in your document. complete the following steps: 1. Click the drop-down arrow next to the QAT. or using the keyboard shortcut. Minimizing the Ribbon If the Ribbon is cluttering your screen. 125 . use key tips to interact with the Ribbon through the keyboard. with the Ribbon minimized. customize the Quick Access Toolbar (QAT) by adding or removing commands as needed as well as move the QAT below the Ribbon. Click the drop-down arrow next to the QAT. click Minimize the Ribbon. 3. you can easily minimize the Ribbon using the Quick Access Toolbar (QAT). end users can customize the Ribbon to fit their needs. click the tab you want to use. From the drop-down list. Option 2: Double-click the active tab To quickly minimize the Ribbon. the Ribbon goes back to being minimized. Double-click a tab again to restore the Ribbon. double-clicking the active tab. Minimize the Ribbon Option 1: Use the QAT 1. and then click the option or command you want to use. click the size of the text you want. and then in the Font group. After you click the text size you want. the user can minimize the Ribbon to save space on the page. Restore the Ribbon To restore the Ribbon. 2. double-click the name of the active tab.

To Add Items to the Quick Access Toolbar at Run Time At run time. you can display the Quick Access Toolbar (QAT) above or below the Ribbon. you can add items to the Quick Access Toolbar (QAT). For easier access. simply right-click the item and select Add to Quick Access Toolbar from the context menu. Place the QAT in the most accessible location:  Show Below the Ribbon – To move the Quick Access Toolbar (QAT) below the Ribbon at run time.  Show Above the Ribbon – To move the QAT back to its location above the Ribbon. To Move the Quick Access Toolbar at Run Time At run time. As you work. click the drop-down arrow next to the QAT and select Show Below the Ribbon. with just a mouse-click you can add items to the QAT as well as move the position of the QAT above or below the Ribbon. the commands you use the most can be added to the QAT. you may find that you use some commands frequently. 126 .Customizing the Quick Access Toolbar Customizing the Quick Access Toolbar (QAT) at run time is simple. To add a command to the QAT at run time. click the drop-down arrow next to the QAT and select Show Above the Ribbon.

127 .

.

The sample shows how to add a C1Ribbon control to the form and populate it with various items programmatically.Click event to handle button clicks. To view samples.Ribbon for WinForms Samples Please be advised that this ComponentOne software tool is accompanied by various sample projects and/or demos. Use the application settings to save and retrieve the QAT position and the visual style of the Ribbon. which may make use of other development tools included with ComponentOne Studios.CommitChanges event. You can access samples from the ComponentOne Sample Explorer. Open. Update the Enabled and Pressed properties of RibbonButton based on current text selection. click the Start button and then click ComponentOne | Studio for WinForms | Samples | Ribbon Samples. CreateAppMenu The sample shows how to create an Application menu containing the New. and a combo box. Visual Basic and C# Samples Sample AddQatItems AddRibbonItems Description The sample shows how to add buttons to the Quick Access Toolbar (QAT) from code. The following table provides a short description for each sample. Use the RibbonCombobox. Manage the input focus so that it goes back to the text area after the user is done using the Ribbon. Launch a dialog box with the launcher button of a Ribbon item group. radio buttons (using a Ribbon toggle group). Save As. Save. persist the list to application settings. Use the RibbonButton. The sample demonstrates how to use C1Ribbon to build a simple Office 2007 style text editor with the following capabilities:     Text editing and formatting Clipboard functions Undo/Redo functions View zooming WordPad The sample shows how to:         Populate a RibbonCombobox with names of all fonts installed in the system. Build and maintain a list of recent documents. The sample also demonstrates the usage of the Ribbon toolbar for arranging the items into rows. and a Recent Document list on the right pane. The items added include toggle buttons. and Print commands in the left menu pane. 129 .

To build on the Ribbon. The combo box is added to the QAT. Each option is described below. making your code easier to understand and maintain. add a tab to the Ribbon. you will be able to utilize the features of C1Ribbon. which enables the floating toolbar. Tip: Ultimately.Ribbon for WinForms Task-Based Help The task-based help assumes that you are familiar with programming in Visual Studio . Click the Ribbon item on the Ribbon to enable its floating toolbar. You can remove the item from the QAT by selecting the combo box item. Select the +QAT button. you will have to write event handling code that performs a specific action on the form's content whenever a button is clicked or a selection is made from a combo box or drop-down menu. see Creating a . it is a good idea to assign meaningful names to Ribbon controls as you create them. Therefore. and add items to the group. use the smart designer or add code. Adding Items to the Quick Access Toolbar The Quick Access Toolbar (QAT) can grow to accommodate as many commands as needed.NET Project (page 15) and Adding the Ribbon for WinForms Controls to a Project (page 16). the Ribbon appears at the top of the form with a tab and a group within the tab. For additional information. add a group to the tab. By following the steps outlined in the help. To add items to the QAT. The following topics demonstrate how to add items to the Quick Access Toolbar. 2. add items to the configuration toolbar. Each task-based help topic also assumes that you have created a new Windows application project and have placed a C1Ribbon control on the form. Adding Ribbon Items When you add the C1Ribbon control to the Windows Form. Select the –QAT button: 130 . To Add QAT Items Using the Smart Designer Complete the following steps: 1.NET. you must add items.

To Add QAT Items Programmatically
Note: In the following example embedded resources containing the following images are used: save.png, undo.png, and repeat.png. To embed a resource, from the Project menu, choose YourProjectName Properties. From the Resources tab, select Add Resource and choose to add an existing file or add a new one.

To add Ribbon items (for example, Save, Undo, and Repeat) to the QAT, add the following code to your project:  Visual Basic ' include the Imports directive for the namespace Imports C1.Win.C1Ribbon Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load C1Ribbon1.Qat.Items.Add(New RibbonButton(My.Resources.Resources.save)) C1Ribbon1.Qat.Items.Add(New RibbonButton(My.Resources.Resources.undo)) C1Ribbon1.Qat.Items.Add(New RibbonButton(My.Resources.Resources.repeat)) End Sub  C# // include the using directive for the namespace using C1.Win.C1Ribbon; private void Form1_Load(object sender, System.EventArgs e) { C1Ribbon1.Qat.Items.Add (new RibbonButton (Properties.Resources.save)); C1Ribbon1.Qat.Items.Add (new RibbonSplitButton (Properties.Resources.undo)); C1Ribbon1.Qat.Items.Add (new RibbonButton (Properties.Resources.repeat)); }

Adding Items to the Hot List
The hot item list, which includes a list of items to add to the Quick Access Toolbar at run time, is available at run time by clicking the Quick Access Toolbar's drop-down arrow. Items added to the hot item list at design time appear in the Customize QAT menu at run time:

131

To Add Hot List Items Using the Smart Designer Complete the following steps: 1. 2. Click the Ribbon item on the Ribbon to enable its floating toolbar. Select the +HOT button.

The combo box is added to the hot list. To Add Hot List Items Programmatically
Note: In the following example embedded resources containing the following images are used: NewBtn.png and OpenBtn.png. To embed a resource, from the Project menu, choose YourProjectName Properties. From the Resources tab, select Add Resource and choose to add an existing file or add a new one.

Complete the following steps: 1. Add the following code to your project:  Visual Basic ' type the Imports directive for the namespace Imports C1.Win.C1Ribbon Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

132

' add items to the hot list Dim NewFileRibbonBtn As RibbonButton = New RibbonButton() Dim OpenFileRibbonBtn As RibbonButton = New RibbonButton() C1Ribbon1.Qat.MenuItems.Add(NewFileRibbonBtn) C1Ribbon1.Qat.MenuItems.Add(OpenFileRibbonBtn) ' set some properties for the hot list items NewFileRibbonBtn.SmallImage = My.Resources.Resources.NewBtn NewFileRibbonBtn.Text = "&New" OpenFileRibbonBtn.SmallImage = My.Resources.Resources.OpenBtn OpenFileRibbonBtn.Text = "&Open" End Sub  C# // type the using directive for the namespace using C1.Win.C1Ribbon; private void Form1_Load(object sender, System.EventArgs e) { // add items to the hot list RibbonButton NewFileRibbonBtn = new RibbonButton(); RibbonButton OpenFileRibbonBtn = new RibbonButton(); C1Ribbon1.Qat.MenuItems.Add(NewFileRibbonBtn); c1Ribbon1.Qat.MenuItems.Add(OpenFileRibbonBtn); // set some properties for the hot list items NewFileRibbonBtn.SmallImage = Properties.Resources.NewBtn; NewFileRibbonBtn.Text = "&New"; OpenFileRibbonBtn.SmallImage = Properties.Resources.OpenBtn; OpenFileRibbonBtn.Text = "&Open"; } 2. 3. Click the Start Debugging button to run the application and click the QAT drop-down arrow to reveal the list of items in the hot list. Select an item from the hot item list to add it to the QAT. The Open and New buttons have been selected in the hot list and added to the QAT:

4.

To remove the items from the QAT simply deselect each item in the hot list.

133

From the Resources tab. Click the Add drop-down button and select RibbonButton from the list. complete the following steps: Adding Items to the Configuration Toolbar Using the Properties Window Complete the following steps: 1. To embed a resource. Delete the text.SmallImage property drop-down button.Text property is set to Button. the RibbonButton. The RibbonConfigToolBar Items Collection Editor appears. Click the RibbonItem. 3.Adding Items to the Configuration Toolbar The configuration toolbar (RibbonConfigToolBar) can contain as many commands as needed. To add Ribbon items to the configuration toolbar. 5. Click OK to close the collection editor. from the Project menu. Adding Items to the Configuration Toolbar Programmatically: Note: The following example uses an embedded resources containing an image. Expand the ConfigToolBar property node. select Add Resource and choose to add an existing file or add a new one. In the RibbonButton's Properties window. 134 . set the following properties:   By default. 2. select the Items property and click the ellipsis button at the right side of the (Collection). then click the second drop-down button and choose the Help image from the list. 4. Click the Ribbon to reveal the list of properties in the Properties window. The item is added to the Members list. choose YourProjectName Properties.

Resources. where the user can access them within a few clicks.Items. certain actions are exclusive to a certain element. add the following controls to your Windows form:    2.C1Ribbon1.  This topic illustrates the following: The following configuration toolbar provides quick access to the Help button: Adding a Contextual Tab to the Ribbon The actions that users need to use regularly should always be available on the Ribbon control.To add items to the configuration toolbar programmatically.Add(new RibbonButton(Properties. an action that allows you to format the font of text may only be necessary when users are editing text in a RichTextBox.Add(new RibbonButton(Properties. However. it would be beneficial place this action (and all other actions specific to RichTextBoxes) under a contextual tabs that only appears when users have selected the RichTextBox. Complete the following steps: 1.C1Ribbon1. add the following code to your Form_Load event:  Visual Basic my. This topic demonstrates how to add a contextual tab group that appears only when a RichTextBox is selected.question)) C# this.ConfigToolBar.question)).Items. From the Visual Studio Toolbox. for example. In the aforementioned case.ConfigToolBar. (1) C1Ribbon control (1) ListBox control (1) RichTextBox control Arrange the form as follows: 135 .Resources.

3. Hover over the Ribbon to enable the floating toolbar. Select View | Designer to return to Design view. and select Add Select View | Code to enter Code view and add the following code to your project: Visual Basic Private Sub richTextBox1_Enter(sender As Object. e As EventArgs) ribbonContextualTabGroup1. e As EventArgs) ribbonContextualTabGroup1. Complete the following actions in the Properties window:  From the drop-down list. EventArgs e) { ribbonContextualTabGroup1.Visible = false. } 5. } private void richTextBox1_Leave(object sender. 136 . EventArgs e) { ribbonContextualTabGroup1. click the Actions button Contextual Tab Group. 6. select c1Ribbon1 and then set the Selectable property to False.  .Visible = True End Sub Private Sub richTextBox1_Leave(sender As Object.Visible = true. 4.Visible = False End Sub  C# private void richTextBox1_Enter(object sender.

Press F5 to run the project. From the drop-down list. select ribbonContextualTabGroup1 and then set the Visible property to False. Click inside the RichTextBox and observe that the contextual tab appears in orange.  7. click the Events button . 137 . From the drop-down list. Set Leave to richTextBox1_Leave. 8. and then set the following event handlers so that the RichTextBox control can handle the code you added to the project:   Set Enter to richTextBox1_Enter. select richTextBox1. Observe that the contextual tab that you added to the project is hidden.

And that’s it! Ribbon for WinForms makes it that simple to add a contextual tab to the Ribbon interface. 138 . Click inside the ListBox and observe that the contextual tab disappears.9.

for example. To edit the label. A new tab is added to the Ribbon. Select the Ribbon to activate it. click the Add button. 6. collection editor. This adds a new tab to the Ribbon. select the Tabs property and click on the ellipsis button next to the (Collection). build on the tab by adding a group to the Ribbon tab (page 140). To learn how to add a contextual tab. you can use the smart designer. 2. Press ENTER or click outside the editing box to accept the change. click the Actions drop-down button. Each option is described below. This enables 2. 4. Enter a new Tab name. click the Tab text so that it is highlighted. 3. Using your mouse pointer. or add code. 5. 139 . From the Ribbon floating toolbar. the new tab is listed in the collection editor's Members list. The RibbonTab Collection Editor appears. From the Ribbon's Properties window. hover over the Ribbon and click the smart designer tag Ribbon floating toolbar: . Select Add Tab. From the collection editor. Next. Add a Ribbon Tab Using the RibbonTab Collection Editor Complete the following steps: 1. see Adding a Contextual Tab to the Ribbon (page 135). Add a Ribbon Tab Using the Smart Designer Complete the following steps: 1.Adding a Tab to the Ribbon To add a tab to the Ribbon. 3. Write.

add the following code to your project:  Visual Basic ' Add a tab to the Ribbon Dim RibbonTab2 As RibbonTab = New RibbonTab() ' Label the tab RibbonTab2. Click OK to close the collection editor. you can edit the properties through the Properties list. Add a Ribbon Tab Programmatically To add a Ribbon tab. Select the tab that you want to add a new group to. C1Ribbon1. Each option is described below. you can use the smart designer. To Add a Ribbon Group Using the Smart Designer Complete the following steps: 1.Tabs. 5. see the Adding a Tab to the Ribbon (page 139) topic. 4.  Adding a Group to the Ribbon Tab To add a group to the Ribbon tab.Tabs.With the new RibbonTab highlighted. For steps on creating a new tab.Text = "Write". collection editor.Add(RibbonTab2) C# // Add a tab to the Ribbon RibbonTab RibbonTab2 = new RibbonTab(). // Label the tab RibbonTab2.Add(RibbonTab2). and change the text to Write.Text = "Write" C1Ribbon1. or add code. 140 . Locate the Text property from the Properties list.

From the collection editor. select the Groups property and click on the ellipsis button next to the (Collection). 7. for example. To edit the label. Select the tab that you want to add a new group to. Font. 141 . From the tab's floating toolbar. Build on the group by adding items to the Ribbon group (page 143). 5. 3. 4. A new group is added to the tab.2. the new group is listed in the Members list. 2. click the group text so that it is highlighted. The RibbonGroup Collection Editor appears. Press ENTER or click outside the editing box to accept the change. From the RibbonTab's Properties window. 6. Click the tab to activate it and enable the tab's floating toolbar: 3. This activates the tab. Select Add Group. To Add a Ribbon Group Using the RibbonGroup Collection Editor Complete the following steps: 1. click the Add button. Enter a new group name. This adds a new group to the tab. click the Actions drop-down button.

Text = "Font" RibbonTab2.Groups. Locate the RibbonGroup. Click OK to close the collection editor. private void Form1_Load(object sender.Win. you can edit the properties through the Properties list.C1Ribbon Private Sub Form1_Load(ByVal sender As System.Load ' Add a tab to the Ribbon Dim RibbonTab2 As RibbonTab = New RibbonTab() ' Label the tab RibbonTab2. To Add a Ribbon Group Programmatically To add a RibbonGroup to the RibbonTab.Text property from the Properties list.C1Ribbon. System. and change the text to Font.EventArgs) Handles MyBase.With the new group highlighted.Add(RibbonTab2) ' Add a group to the Write tab Dim RibbonGroup2 As RibbonGroup = New RibbonGroup() ' Label the group RibbonGroup2.Add(RibbonGroup2) End Sub  C# // type the using directive for the namespace using C1.Text = "Write" C1Ribbon1. 5.Tabs. ByVal e As System. add the following code to your project:  Visual Basic ' type the Imports directive for the namespace Imports C1. 4.Win.Object.EventArgs e) 142 .

Add(RibbonGroup2). // Label the tab RibbonTab2. Click the Actions drop-down button. } Adding Items to the Ribbon Group To add items to the Ribbon group. 5. Select the Ribbon group to enable the group's floating toolbar: 2. RibbonTab2.Text = "Write". To Add Ribbon Items Using the Smart Designer Complete the following steps: 1. 3. Click the Small Image (16x16) drop-down arrow and select the AlignTextLeft image. for example. 143 . To add an image. Each option is described below. Click the Change Image button . collection editor. click the text so that it is highlighted and press DELETE. // Label the group RibbonGroup2. // Add a group to the Write tab RibbonGroup RibbonGroup2 = new RibbonGroup(). This reveals a list of Ribbon items to add to the group. Add ToggleButton.Add(RibbonTab2).Text = "Font". To delete the toggle button's label.Tabs. you can use the smart designer. c1Ribbon1. or add code. 6. 8. click the toggle button to activate it and enable the toggle button's floating toolbar: 7. Select an item to add. Press ENTER or click outside the editing box to accept the change. The Change Image dialog box appears. 4.Groups.{ // Add a tab to the Ribbon RibbonTab RibbonTab2 = new RibbonTab().

The RibbonGroup Items Collection Editor appears. From the collection editor. 144 . click the Add drop-down button. Click the glyph to activate the toggle group's floating toolbar and then use the Actions drop-down list to add additional toggle buttons. which is part of the toggle group. move the mouse over the toggle button. 2. Continue to build on the group by adding Ribbon elements. select the Items property and click the ellipsis button at the right side of the (Collection). You will see a toggle group's glyph at the top-left corner of the item. toolbars. and so on to fit your needs. check boxes. This activates the group. From the Ribbon group's Properties window. 3. To Add Ribbon Items Using the Collection Editor Complete the following steps: 1. Note: To add more toggle buttons to the toggle group. combo boxes. Select the group that you want to add Ribbon items to.9. such as buttons.

From the Resources tab. Select RibbonToggleButton from the list of available items. for example.png. from the Project menu. choose YourProjectName Properties.Win. The new item is listed in the Members list. To add Ribbon items to the group. select Add Resource and choose to add use an existing file or add a new one.EventArgs) Handles MyBase.png.png. Click OK to close the collection editor. ByVal e As System. To Add Ribbon Items Programmatically Note: In the following example embedded resources containing the following (16x16) images are used: AlignLeft. you can edit the properties through the Properties list.Load ' Add a tab Dim RibbonTab2 As New RibbonTab() ' Label the tab RibbonTab2.Text = "Write" c1Ribbon1.Add(RibbonTab2) ' Add a group to the Write tab Dim RibbonGroup2 As New RibbonGroup() ' Label the group RibbonGroup2.Text = "Font" 145 . To embed a resource. add the following code to your project:  Visual Basic ' type the Imports directive for the namespace Imports C1.Tabs.4. a toggle group with three toggle buttons. 5.Object. AlignCenter. With the new item is highlighted.C1Ribbon Private Sub Form1_Load(ByVal sender As System. and AlignRight.

Add(ToggleBtn1) ' Edit the toggle button properties ToggleBtn1.Resources. System.Text = "Write". RibbonTab2. // Add RibbonToggleButton to the Ribbon Group RibbonGroup2.EventArgs e) { // Add a tab RibbonTab RibbonTab2 = new RibbonTab(). 146 . A list of the tab's properties will be revealed in the Properties window. 2.SmallImage = My. ToggleBtn1. and RibbonTabs using the ToolTip Editor.RibbonTab2.Add(ToggleBtn1). locate the tab's ToolTip property and click the ellispis ( ) button. } Creating A Rich ToolTip You can add rich ToolTips to RibbonItems.Items. ToggleBtn1.Resources.Tabs.Groups. private void Form1_Load(object sender.SmallImage = Properties. // Edit the toggle button properties ToggleBtn1.ToolTip = "Align Left" End Sub  C# // type the using directive for the namespace using C1.Add(RibbonGroup2).Text = "Font". Note: To learn how to create a regular ToolTip for a ribbon item.Add(RibbonTab2). // Add a group to the Write tab RibbonGroup RibbonGroup2 = new RibbonGroup(). Complete the following steps: 1. In this topic. see Displaying ToolTips for the Ribbon Items (page 160). // Label the group RibbonGroup2.Text = "".Groups.Text = "" ToggleBtn1.Resources. Select C1Ribbon's default tab to activate it. // Label the tab RibbonTab2.Items. C1Ribbon1.ToolTip = "Align Left". we will add a rich ToolTip to a RibbonTab.Add(RibbonGroup2) Dim ToggleBtn1 As New RibbonToggleButton() ' Add RibbonToggleButton to the Ribbon Group RibbonGroup2.AlignLeft ToggleBtn1.AlignLeft. RibbonToggleButton ToggleBtn1 = new RibbonToggleButton(). In the Properties window.C1Ribbon.Win. RibbonGroups.

Click the Image drop-down and select Add Image to access the Open dialog box. Type the following text into the Body Text text box: "ComponentOne Ribbon for WinForms. delete the <b> and </b> tags that enclose "www.com". Click the Html tab to bring its tab page into focus and then complete the following steps: a.componentone. Select "ComponentOne Ribbon for WinForms" and press the Italic button. Type "www. 147 .componentone." Check the Bottom Separator checkbox. Enter "ToolTip Tutorial" into the Title text box. b. The Preview pane will display an image similar to the following: 6. 3. f. e.The ToolTip editor opens with the Office tab page in focus.com" into the Subtitle text box. d. Complete the following tasks in the Office tab page: a. In the editor. Select a small image (an icon of 16x16 pixels is best) and click Open. b. Check the Top Separator checkbox. c.

For example. then press OK to close the C1InputPanel Collection Editor. You can easily add a control using the RibbonControlHost element by defining a new class inheriting C1.c. The Preview pane will display an image similar to the following: 7. complete the following steps to add a standard TextBox control to a Ribbon group: 1. For more information see Creating a Ribbon Application Project (page 16).C1Ribbon. Set the IsBalloon property to True. This topic illustrates the following: Once the project is built. and select View | Code to open Code view. 148 .05 seconds) after a user hovers over the tab with the cursor. Place your cursor in front of the title ("ToolTip Tutorial") and type <font color="red">.Win. Click the Properties tab to bring its tab page into focus and then set the following properties:     Set the Border property to True Set the BorderColor property to Red. Open the MainRibbonForm to view the Ribbon form. you can add arbitrary controls to ComponentOne Ribbon for WinForms. This means that the ToolTip will appear 50 milliseconds (. Create a new Ribbon application. hover over the RibbonTab with your cursor to make the ToolTip appear. Move your cursor to the end of the title and type </font>. Press OK to close the ToolTip Editor. Set the IntialDelay property to "50".RibbonControlHost. The resulting ToolTip will resemble the image below: Embedding Controls in a Ribbon Beginning with the 2008 v2 release. 2. 8.

Click OK to close the Adding RibbonControlHost dialog box.FormName+TextBoxHost" replacing ProjectName and FormName with the names or your project and form.Forms. Build and close your project.TextBox()) End Sub End Class C# public class TextBoxHost : C1.TextBox()) { } }  4.New(New System.Win. and select Add Tab.Win. 7. and then return to Design view.Windows. 6. 8. for example "ProjectName.RibbonControlHost { public TextBoxHost() : base(new System.3. 5. and from the floating toolbar click the Action button and select Add ControlHost. Select the new Ribbon group. click the Actions button. The Adding RibbonControlHost dialog box will open.C1Ribbon.RibbonControlHost Public Sub New() MyBase. Add the following code to your project to create a new TextBoxHost class that inherits the RibbonControlHost element:  Visual Basic Public Class TextBoxHost Inherits C1. Open the main menu floating toolbar.Windows.Forms. A new Ribbon tab with an empty Ribbon group will be added to the Ribbon. Type the name of the control host in the Adding RibbonControlHost dialog box.C1Ribbon. 149 .

To access other properties.Notice that the TextBox control now appears in the Ribbon group: Tip: When you next add the TextBoxHost element you won't have to type its name. 150 . and events of the hosted control use the RibbonControlHost. methods. You can add custom functionality into properties to enhance the hosted control. to make the items on the Ribbon perform specific functions requires coding. This topic illustrates the following: At run time. The name of this class will be available in the drop-down list in the Adding RibbonControlHost dialog box. you will be able to interact with the TextBoxHost element as you would a standard TextBox. The RibbonControlHost class publishes the standard properties and events of the hosted control. It is also possible to override methods such as RibbonControlHost. Handling Ribbon Events While the majority of the Ribbon can be created using the visual designers.OnSubscribeControlEvents to handle events raised by the hosted control.Control property. The following topics show how to add Click event handlers for various items on the Ribbon.

RichTextBox1. ByVal e As System. EventArgs e) { this.Object.Focus(). 151 . see Adding Items to the Ribbon Group (page 143).Handling the RibbonButton.Focus() End Sub ' handles the Click event for the Paste button Private Sub PasteBtn_Click(ByVal sender As System.Click Me.Paste() Me.Click Me.richTextBox1. EventArgs e) { this.Copy(). create RibbonButton.RichTextBox1.Cut() Me.richTextBox1. this. this.C1Ribbon.richTextBox1.Object.Click Me. and Paste buttons. To copy.Paste(). } // handles the Click event for the Cut button private void CutBtn_Click(object sender.Win. EventArgs e) { this.richTextBox1.RichTextBox1.RichTextBox1. this. ByVal e As System. } // handles the Click event for the Paste button private void PasteBtn_Click(object sender.richTextBox1.Object. or paste text in the rich text box.Cut().Click Event Note: This topic assumes that you have added three Ribbon buttons to the Ribbon and a RichTextBox control to the Ribbon Form.Focus() End Sub ' handles the Click event for the Cut button Private Sub CutBtn_Click(ByVal sender As System.richTextBox1. // handles the Click event for the Copy button private void CopyBtn_Click(object sender.C1Ribbon ' handles the Click event for the Copy button Private Sub CopyBtn_Click(ByVal sender As System. For steps on how to add a Ribbon control to the Ribbon.RichTextBox1. Cut.EventArgs) Handles PasteBtn.Focus() End Sub  C# // type the using directive for the namespace using C1.Copy() Me.RichTextBox1.EventArgs) Handles Cutbtn.Focus().Click event handlers for the Copy.EventArgs) Handles CopyBtn. ByVal e As System. cut.Focus(). Add the following code to your project:  Visual Basic ' type the Imports directive for the namespace Imports C1.Win.

RichTextBox1.RichTextBox1. Me.Click ' assign style for Bold button ToggleSelectionFontStyle(FontStyle. see Adding Items to the Ribbon Group (page 143).Name = PasteBtn Handling the RibbonToggleButton.SelectionFont.richTextBox1.") Else Me. Add the following code to your project:  Visual Basic ' type the Imports directive for the namespace Imports C1.} Note that the following properties have been set for the RibbonButton.RichTextBox1.RichTextBox1.SelectionFont = New Font(Me.Style Xor fontStyle) End If Me.RichTextBox1. ByVal e As EventArgs) Handles BoldBtn.C1Ribbon.C1Ribbon ' handles the Click event for the Bold button Private Sub BoldBtn_Click(ByVal sender As Object.SelectionFont Is Nothing Then MessageBox.Click Event Note: This topic assumes that you have added a Ribbon toggle button to the Ribbon and a RichTextBox control to the Ribbon Form.Show("Cannot change font style while selected text has more than one font.Bold) End Sub ' apply font style to the RichTextBox Sub ToggleSelectionFontStyle(ByVal fontStyle As FontStyle) If Me. To make the selected text bold for a rich text box.Name properties:    RibbonButton1.Name = CopyBtn RibbonButton2.Win.Click event handler for the Bold button.Win.SelectionFont == null) { 152 .Bold).SelectionFont. EventArgs e) { // assign style for Bold button ToggleSelectionFontStyle(FontStyle. // handles the Click event for the Bold button private void BoldBtn_Click(object sender. create a RibbonToggleButton.Focus End Sub  C# // type the using directive for the namespace using C1. For steps on how to add a Ribbon control to the Ribbon. } // apply font style to the richTextBox void ToggleSelectionFontStyle(FontStyle fontStyle) { if (this.Name = CutBtn RibbonButton3.

} this.Object. To Add a Launcher Button Using the Properties Window Optionally.SelectionFont.SelectionFont = new Font(this.Load ' add launcher button Me. private void Form1_Load(object sender.Name property has been set to BoldBtn for this example.richTextBox1.EventArgs e) { // add launcher button 153 .HasLauncherButton = True End Sub  C# // type the using directive for the namespace using C1.richTextBox1. ByVal e As System.Focus().HasLauncherButton property's drop-down arrow and select True from the drop-down list. To Add a Launcher Button Programmatically: To add a launcher button to the group (RibbonGroup1).RibbonGroup1. click the Ribbon group and hover over the group's caption area to enable the following floating toolbar: 2.C1Ribbon.Win. Click the Add Launcher Button button. add the following code to your project:  Visual Basic ' type the Imports directive for the namespace Imports C1.Show("Cannot change font style while selected text has more than one font.EventArgs) Handles MyBase.SelectionFont. To Add a Launcher Button Using the Smart Designer Complete the following steps: 1. Click the group on the Form to reveal the group properties in the Properties window. you can add a launcher button to the Ribbon group using the Properties window.richTextBox1."). } else { this. Adding a Launcher Button to the Ribbon Group You can add a dialog box launcher button to the Ribbon group using the smart designer. Locate the RibbonGroup. Properties window. } Note that the RibbonToggleButton. System.MessageBox. or Code Editor.Style ^ fontStyle).richTextBox1. this.C1Ribbon Private Sub Form1_Load(ByVal sender As System. Using your mouse pointer.Win.

set the following properties in the Properties window:   9. set the RibbonProgressBar.Win.EventArgs) Handles MyBase.HasLauncherButton = true. add the following code to enable the items on the left and right panel:  Visual Basic ' type the Imports directive for the namespace Imports C1. Note that you can add items to the status bar using the smart designer.LargeChange = 5 RibbonTrackBar1. The C1StatusBar LeftPaneItems Collection Editor appears. Collection Editor.Value RibbonProgressBar1. Click the Add drop-down button and select Ribbon ProgressBar from the list. The C1StatusBar RightPaneItems Collection Editor appears. 11. 6. 3.Load RibbonTrackBar1. 2.SmallImage = None RibbonButton. With the button selected in the Members list. With the progress bar selected in the Members list.RightPaneWidth property to 150. In C1StatusBar's Properties window.Value = val RibbonButton1.Text = 30% Click OK to close the collection editor. In C1StatusBar's Properties window.Value = 30 AddHandler RibbonTrackBar1. Complete the following steps: 1.SmallChange = 1 RibbonTrackBar1.Scroll. then click the ellipsis button.Value property to 30. 7. RibbonItem. 5. click on the (Collection) next to the LeftPaneItems property. ByVal e As EventArgs) Dim val As Integer = RibbonTrackBar1. 4. Click the C1StatusBar control to activate it. Click the Add drop-down button and select Ribbon Button and Ribbon TrackBar to add the items to the Members list.ribbonGroup1.ToString + "%" End Sub 154 . or Code Editor. 8. 10.Text = val.Object. AddressOf RibbonTrackBar1_Scroll End Sub Sub RibbonTrackBar1_Scroll(ByVal sender As Object. In the Code Editor.Maximum = 100 RibbonTrackBar1. then click the ellipsis button. Click OK to close the collection editor. ByVal e As System.this.Minimum = 0 RibbonTrackBar1. set the C1StatusBar. double-click the C1StatusBar icon in the Visual Studio Toolbox to add the C1StatusBar control to the Ribbon Form. } Adding Status Bar Items Before you begin this task.C1Ribbon Private Sub Form1_Load(ByVal sender As System. The status bar docks at the bottom of the Ribbon Form. In C1StatusBar's Properties window. click on the (Collection) next to the RightPaneItems property. This topic shows how to add status bar items using the Collection Editors.

ToString() + "%". ribbonTrackBar1.C1Ribbon.Value = val. ribbonProgressBar1. EventArgs e) { ribbonTrackBar1.Value = 30. ribbonTrackBar1.Win. EventArgs e) { int val = _trackbar.Value.Maximum = 100. ribbonTrackBar1.SmallChange = 1. ribbonTrackBar1. Notice that the progress bar and button control values change simultaneously: Changing the Color Picker Theme Colors The RibbonColorPicker has two sections the theme colors and the standard colors: 155 . click and drag the track bar control. private void Form1_Load(object sender. C# // type the using directive for the namespace using C1. } void ribbonTrackBar1_Scroll(object sender. ribbonButton1.Minimum = 0.LargeChange = 5. } This topic illustrates the following: Run the application.Scroll += new EventHandler(ribbonTrackBar1_Scroll). ribbonTrackBar1.Text = val.

To Change the Color Picker Theme Using the Properties Window You can change the OfficeColorPalette property using the Properties window. Add a color picker to the Ribbon group. Locate the OfficeColorPalette property's drop-down arrow and select the new color theme from the list. Metro: To Change the Color Picker Theme Programmatically 156 .You can change the theme colors by modifying the OfficeColorPalette property through the Properties window or programmatically. and then click the color picker item to reveal the RibbonColorPicker properties in the Properties window. for example.

System. } This topic illustrates the following: Run the application.Object. // add the FontColor image to your Resources folder // set the image for the color picker ColorPicker. for example.Items. // add a color picker to the group ribbonGroup1. // set the theme color for the color picker ColorPicker.Load Dim ColorPicker As RibbonColorPicker = New RibbonColorPicker() ' add a color picker to the group RibbonGroup1.SmallImage = Properties.Add(ColorPicker) ' add the FontColor image to your Resources folder ' set the image for the color picker ColorPicker. The new color theme is visible under the Theme Colors section: 157 . and click the color picker.Metro. from the Project menu.C1Ribbon Private Sub Form1_Load(ByVal sender As System. To embed a resource.EventArgs) Handles MyBase.OfficeColorPalette = Office2007ColorThemes.Win. add the following code to your project:  Visual Basic ' type the Imports directive for the namespace Imports C1.Add(ColorPicker). select Add Resource and choose to an existing file or add a new one. ByVal e As System.Metro.FontColor.Metro End Sub  C# // type the using directive for the namespace using C1.OfficeColorPalette = Office2007ColorThemes. private void Form1_Load(object sender. From the Resources tab.FontColor ' set the theme color for the color picker ColorPicker.EventArgs e) { RibbonColorPicker ColorPicker = new RibbonColorPicker().Resources.Items.SmallImage = Properties.Win.png (16x16) image is used.Note: In the following example an embedded resource containing the FontColor. To change the color picker's theme to Office2007ColorThemes.Resources.C1Ribbon. choose YourProjectName Properties.

2. using the smart tag. 3. hover over the Ribbon and click the smart designer tag Ribbon floating toolbar: . Click the smart tag ( ) to enable the C1Ribbon Tasks menu. Each option is described below. or by adding code to set the C1Ribbon. To Change the Visual Style Using the Smart Designer Complete the following steps: 1. Properties window. This enables the 158 . Select the Visual Style drop-down arrow and choose Office2007Black. To Change the Visual Style Using the Smart Tag Complete the following steps: 1.Changing the Visual Style You can change the Ribbon's visual style. smart designer.VisualStyle property. Select the Ribbon to activate the control. Using your mouse pointer.

the keys need to be pressed together and most.Win.Win.EventArgs) Handles MyBase. the Bold button) to display its properties in the Properties window. To Change the Visual Style Programmatically To change the Ribbon's visual style to Office2007Black. but not all.2. 159 .VisualStyle property using the Properties window.Click event handler (page 152) for the Bold button. Change the Windows Form to a Ribbon Form.Win. Office2007Black. private void Form1_Load(object sender.VisualStyle. key combinations involve pressing CTRL plus other keys (for example. for example. Complete the following steps: 1. 2. you could use a direct key combination. The Visual Style dialog box From the Ribbon Visual Style drop-down list.c1Ribbon1. 3.Win.Load Me. click the Change Ribbon's Visual Style button appears. .C1Ribbon Private Sub Form1_Load(ByVal sender As System. To make text bold. 3.Office2007Black. select the new color scheme from the list. ByVal e As System.VisualStyle.C1Ribbon. add the following code to your project:  Visual Basic ' type the Imports directive for the namespace Imports C1. you can change the C1Ribbon.EventArgs e) { this. To trigger the action. Click the Ribbon to reveal the Ribbon properties in the Properties window.C1Ribbon.C1Ribbon.VisualStyle = C1. Office2007Black.Office2007Black End Sub  C# // type the using directive for the namespace using C1.VisualStyle = C1. for example. for example. Locate the ShortcutKeys property and select the Ctrl check box and select B from the drop-down list.Object. Locate the C1Ribbon. Select the Ribbon button (in this case. } Creating Shortcut Keys You can use the keyboard to complete specific commands. CTRL+B to make text bold).VisualStyle property's drop-down arrow and select the new Windows XP theme from the list.C1Ribbon1. From the main toolbar. System. Note: This topic assumes that you have added a Ribbon button to the group (page 23) and created a RibbonToggleButton. To Change the Visual Style Using the Properties Window Optionally.

160 . Bold. To Display ToolTips Using the Smart Designer Complete the following steps: 1.ToolTip property. see Creating a Rich ToolTip (page 146).Click event for the Bold button and make the selected text Bold font style. In the ToolTip box enter the ToolTip text. 5.4. Properties window. use the smart designer. Now when you run the application pressing the CTRL+B key combination will trigger the RibbonToggleButton. The Text Settings dialog box appears. click the Text Settings button . From the floating toolbar. 3. for example. Note: To learn how to create a rich ToolTip. Click outside the Shortcut Keys editor to accept the changes. Each option is described below. or add code to set the RibbonItem. Save and run the application. Displaying ToolTips for the Ribbon Items To display a ToolTip for a Ribbon item. Select the toggle button to activate the element and enable the toggle button's floating toolbar: 2.

Object. To set the ToolTip text for a toggle button to Bold. for example.SmallImage = My.Bold. private void Form1_Load(object sender. The "Bold" ToolTip text will appear for the Ribbon toggle button when you mouse over the Bold button.ToolTip = "Bold" End With End Sub  C# // type the using directive for the namespace using C1.SmallImage = My.ToolTip property and enter the ToolTip text in the box. 5. Click the toggle button to reveal the item's properties in the Properties window.Win.C1Ribbon.png. ByVal e As System. Save and run your application. Locate the RibbonItem. From the Resources tab. Bold. add the following code to your project:  Visual Basic ' type the Imports directive for the namespace Imports C1.Resources. // Show a ToolTip 161 .EventArgs) Handles MyBase. To embed a resource.C1Ribbon Private Sub Form1_Load(ByVal sender As System.Text = "" ' Set the 16x16 image . To Display ToolTips Using the Properties Window Optionally. from the Project menu.Win.Text = "". you can set the RibbonItem. To Display ToolTips Programmatically Note: In the following example an embedded resource containing the (16x16) image is used: Bold. System.Load With RibbonToggleButton1 ' No text label .ribbonToggleButton1. // Set the 16x16 image this. choose YourProjectName Properties. select Add Resource and choose to add an existing file or add a new one.ribbonToggleButton1. Click the x or click outside the Text Settings dialog box to accept your changes.ToolTip property using the Properties window. ' Show a ToolTip .EventArgs e) { // No text label this.4.Resources.Bold.

To Import a Custom Image Using the Smart Designer Complete the following steps: 162 . Notice that the tab has been removed from the Ribbon. This topic shows how to modify the design of the Ribbon using the Hide/Show Ribbon Items designer. Each option is described below. use the smart designer. You can easily add the tab back to the Ribbon by selecting the View [RibbonTab] check box in the designer. From the Hide/Show Ribbon Items designer. deselect the following object: View [RibbonTab]. hover over the Ribbon and click the smart designer tag Ribbon floating toolbar: . Complete the following steps: 1. For this example.this. Importing a Custom Image for the Application Button You can customize the main application button (RibbonApplicationMenu) to fit your needs.ToolTip = "Bold". Properties window. } Hiding/Showing Ribbon Items Using the Tree-based Designer You can easily customize the design of the Ribbon at design time using the smart designers. or add code. This enables 2. click the Hide/show Ribbon items button appears: . you can simply deselect the check box to remove objects from the Ribbon. From the main floating toolbar.ribbonToggleButton1. Using your mouse pointer. To display a custom image for the application button. The tree-based designer 3.

The Change Image dialog box appears. Click the 32x32. Select the application button to activate the element and enable the application button floating toolbar: 2. 5. The Select Resource dialog box appears. The Open dialog box appears. Import button. 163 . 3. The image appears in the preview window of the Select Resource dialog box: 6. To Import a Custom Image Using the Properties Window Complete the following steps: 1. and select Import. Browse to your custom image and click Open.1. Click the RibbonItem. The image now appears for the application button. Click the Change Image button. 4.LargeImage drop-down arrow. then click the Import button. Select the Local resource option (or select Project resource file if you have an embedded image). Click the application button to reveal its properties in the Properties window. 2. Click OK.

AppButtonImage. } This topic illustrates the following: The following Ribbon application button uses a 32x32 custom image: 164 .Resources.C1Ribbon1.EventArgs) Handles MyBase. add the following code to your project:  Visual Basic ' type the Imports directive for the namespace Imports C1.EventArgs e) { this.Load Me.C1Ribbon Private Sub Form1_Load(ByVal sender As System. To Import a Custom Image Programmatically To display a custom image for the application button.ApplicationMenu. Follow steps 4 – 6 above.c1Ribbon1.ApplicationMenu.Resources. private void Form1_Load(object sender.LargeImage = My.3.Win.Win.LargeImage = Properties. System. The Select Resource dialog box appears.AppButtonImage End Sub  C# // type the using directive for the namespace using C1.C1Ribbon.Object.Resources. ByVal e As System.

This adds each item to the Ribbon group: Notice that the text box parts do not line up vertically. you may need to increase or decrease the size of the gap so that the parts line up vertically. Click the Actions drop-down button.RibbonComboBox. Locate the RibbonComboBox. Note: Depending on the length of your label. Select the combo box to activate it and from the Ribbon combo box's Properties window:   Locate the RibbonComboBox. Select Add ComboBox and then Add EditBox from the list. The next step shows how to specify the gap between the label and text box parts of the element so that the parts line up. Locate the RibbonComboBox.Label property and set the text to "Find:".GapBeforeTextArea property and set the gap (in pixels) to 3. Locate the RibbonTextBox. 4.GapBeforeTextArea property and set the gap (in pixels) to 28.Lining Up Combo/Edit Boxes on a Group You can line up text box parts of several combo/edit boxes vertically on a Ribbon group using the RibbonComboBox. select the edit box to activate it and from the Ribbon edit box's Properties window:   To Line up Combo/Edit Boxes on a Group Programmatically 165 . This reveals a list of Ribbon items to add to the group.GapBeforeTextArea and RibbonTextBox. 5.GapBeforeTextArea properties. 3.Label property and set the text to "Favorites:". The maximum allowable value for this property has been set to 80. Select the Ribbon group to enable the group's floating toolbar: 2. Next. This property specifies the gap (in pixels) between the label and text box parts of the element. To Line up Combo/Edit Boxes on a Group Using the Smart Designer and Properties Window Complete the following steps: 1.RibbonComboBox.

Win. Add the following code to your project:  Visual Basic ' type the Imports directive for the namespace Imports C1. private void Form1_Load(object sender.Win. ribbonGroup1.Items.Items.EventArgs) Handles MyBase.C1Ribbon. } This topic illustrates the following: With the GapBeforeTextArea property set for the Ribbon combo box and edit box items. // add a label ComboBox1. // specify the gap between the "label" and "text box" // parts of the combo/edit box elements ComboBox1.Optionally.Add(EditBox1). ribbonGroup1. EditBox1.Label = "Favorites:".Items.Add(ComboBox1). ByVal e As System. EditBox1.Label = "Find:" ' specify the gap between the "label" and "text box" ' parts of the combo/edit box elements ComboBox1.Items.GapBeforeTextArea = 3.EventArgs e) { // add a RibbonComboBox and RibbonTextBox items // to the Ribbon group RibbonComboBox ComboBox1 = new RibbonComboBox().GapBeforeTextArea = 28 End Sub  C# // type the using directive for the namespace using C1. you can add the Ribbon combo/edit boxes to the Ribbon group and specify the gap between the label and text box parts of the combo/edit box elements using code.Load ' add a RibbonComboBox and RibbonTextBox items ' to the Ribbon group Dim ComboBox1 As RibbonComboBox = New RibbonComboBox() Dim EditBox1 As RibbonTextBox = New RibbonTextBox() RibbonGroup1.Label = "Favorites:" EditBox1.Add(ComboBox1) RibbonGroup1.GapBeforeTextArea = 3 EditBox1.GapBeforeTextArea = 28. the text box parts line up vertically on the Ribbon group: 166 .Add(EditBox1) ' add a label ComboBox1.C1Ribbon Private Sub Form1_Load(ByVal sender As System. System.Label = "Find:". RibbonTextBox EditBox1 = new RibbonTextBox().Object.

Click the Application button to reveal the list of Application menu properties in the Properties window. Click the Add drop-down arrow and select RibbonButton. From the Properties window. To Create the Start Menu Using the Collection Editor Complete the following steps: 1. You should now have three buttons added to the Members list: 167 . 2. and you can add as many or as few items to the menu to fit your needs. Repeat this step to add two more Ribbon buttons.Working with the Application Menu The following topics explain how to complete various application menu tasks. from creating the application menu to customizing the appearance of the application button. 3. Creating the Application Menu By default. select the LeftPaneItems property and click the ellipsis button at the right side of the (Collection). The RibbonApplicationMenu LeftPaneItems Collection Editor appears. the Application menu is empty. The following steps demonstrate how to customize the main application button's drop-down menu.

the RibbonButton. 7.png.4. Set the following properties for the first button:   By default. Click the RibbonItem. From the Resources tab. Select the third button in the list and set the following properties using the collection editor's Properties window:   By default.Text property is set to Button. then click the second drop-down button and choose the Save image from the list. To embed a resource. then click the second drop-down button and choose the Open image from the list. 6. Delete the text and set it to &New. 168 . choose YourProjectName Properties. 5.LargeImage property drop-down button. the RibbonButton. Click the RibbonItem.png. select Add Resource and choose to add an existing file or add a new one.Text property is set to Button.Text property is set to Button. Delete the text and set it to &Open.LargeImage property drop-down button. To Create the Start Menu Programmatically Note: In the following example embedded resources containing the following (32x32) images are used: NewBtn. OpenBtn. Delete the text and set it to &Save. from the Project menu.png. and SaveBtn. Select the first button in the list to edit its properties using the collection editor's Properties window. the RibbonButton.LargeImage property drop-down button. Click the RibbonItem. then click the second drop-down button and choose the New image from the list. Select the second button in the list and set the following properties using the collection editor's Properties window:   By default. Click OK to close the collection editor.

Add(SaveButton) ' Set properties for the left pane items NewButton.EventArgs) Handles MyBase.Add(SaveButton).Items.EventArgs e) { // Create the items for the left pane RibbonButton NewButton = new RibbonButton().NewBtn.C1Ribbon1.Load ' Create the items for the left pane Dim NewButton As RibbonButton = New RibbonButton() Dim OpenButton As RibbonButton = New RibbonButton() Dim SaveButton As RibbonButton = New RibbonButton() ' Add items to the left pane menu Me.Resources.LargeImage = My.NewBtn OpenButton. OpenButton.Add(NewButton).Add(OpenButton). add the following code to your project:  Visual Basic ' Include the Imports directive for the namespace Imports C1.Resources.Resources.c1Ribbon1.Resources.ApplicationMenu. System.LeftPane.C1Ribbon1.Resources. RibbonButton OpenButton = new RibbonButton().LeftPane.ApplicationMenu.OpenBtn. this.C1Ribbon.LargeImage = My.LeftPane.LeftPane.c1Ribbon1.Items.ApplicationMenu.LeftPane. private void Form1_Load(object sender.Resources. } This topic illustrates the following: Run the application and click the main application button to reveal the drop-down menu of commands: 169 .To create a Start menu of commands.Text = "&Open". ByVal e As System.OpenBtn SaveButton.Items.SaveBtn End Sub  C# // Include the using directive for the namespace using C1.C1Ribbon Private Sub Form1_Load(ByVal sender As System.LargeImage = Properties.Win.Add(OpenButton) Me.Text = "&New". SaveButton.LeftPane.c1Ribbon1.SaveBtn.Object.Text = "&Save".Text = "&New" NewButton.Text = "&Open" OpenButton.LargeImage = Properties.ApplicationMenu. NewButton.Items. RibbonButton SaveButton = new RibbonButton().Resources.LargeImage = Properties.Items.Resources. this.Add(NewButton) Me.LargeImage = My.C1Ribbon1. // Add items to the left pane menu this. // Set properties for the left pane items NewButton.ApplicationMenu.Win.Resources. SaveButton. OpenButton.Items.Text = "&Save" SaveButton.ApplicationMenu.

ColoredButton property. In the Properties window. Click the ColoredButton drop-down arrow and select a color from the list. For this example. you can change the color of the button to another color using the RibbonApplicationMenu. For more information. 2. To Change the Color of the Application Button Using the Smart Designer Complete the following steps: 1. 170 . expand the Application Menu node. pick Rose.Changing the Color of the Application Button When the Ribbon is displaying a Windows 7-style application button. This topic assumes that you already have already set the Ribbon’s application button to the Windows 7-style. see Making a Windows-7 Style Application Button (page 173).

C1Ribbon.Win. The Open dialog box appears. 4. Select the Local resource option (or select Project resource file if you have an embedded image). Import button. Each option is described below. Properties window. use the smart designer. The image appears in the preview window of the Select Resource dialog box: 171 . Click the 32x32. The Change Image dialog box appears. The Select Resource dialog box appears.ApplicationMenu. The result of this topic will resemble the following image: This topic illustrates the following:  Importing a Custom Image for the Application Button You can customize the main application button (RibbonApplicationMenu) to fit your needs. then click the Import button.Rose C# c1Ribbon1.ColoredButton = C1. 3.ApplicationMenu.To Change the Color of the Application Button in Code To change the color of the application to Rose using code. Click the Change Image button. or add code. To Import a Custom Image Using the Smart Designer Complete the following steps: 1.Rose. add the following code to the project:  Visual Basic C1Ribbon1.ColoredButton.ColoredButton. Select the application button to activate the element and enable the application button floating toolbar: 2. 5. To display a custom image for the application button. Browse to your custom image and click Open.C1Ribbon.Win.ColoredButton = C1.

To Import a Custom Image Programmatically To display a custom image for the application button. The Select Resource dialog box appears. The image now appears for the application button. Click the RibbonItem. and select Import.6. 8. Click the application button to reveal its properties in the Properties window. To Import a Custom Image Using the Properties Window Complete the following steps: 7. 9. Follow steps 4 – 6 above.LargeImage drop-down arrow. add the following code to your project:  Visual Basic ' type the Imports directive for the namespace 172 . Click OK.

} This topic illustrates the following: The following Ribbon application button uses a 32x32 custom image: Making a Windows 7-Style Application Button Even if you’re using one of the Office2007 visual styles. you can make the Ribbon’s menu application button mimic the Windows 7-style application button that appears in applications like Word and Paint. You’ll also add text and an image to that button.Resources.AppButtonImage End Sub  C# // type the using directive for the namespace using C1.LargeImage = Properties.C1Ribbon. In the Properties window.AppButtonImage.Win. you can use images from the Visual Studio 2008 Image Library or the Visual Studio 2010 Image Library.\Program Files\Microsoft Visual Studio 9.C1Ribbon1. and they are located in the following directories:  Visual Studio 2008: \.. you’ll create a Windows 7-style application button by setting the RibbonApplicationMenu.Imports C1. 173 . Tip: The ability to programmatically reference the standard Ribbon icons is not supported by Ribbon for WinForms. System. 2. If you need to add the icons at run time. Set the following properties:  Set the Win7Look property to True to change the look of the Ribbon application button.0\Common7\VS2010ImageLibrary\1033\ Complete the following steps: 1. In this topic. private void Form1_Load(object sender.ApplicationMenu.Resources. ByVal e As System.C1Ribbon Private Sub Form1_Load(ByVal sender As System.c1Ribbon1.LargeImage = My. expand the Application Menu node.ApplicationMenu.Load Me.0\Common7\VS2008ImageLibrary\1033\  Visual Studio 2010: \…\Program Files\Microsoft Visual Studio 10.Win.Object.EventArgs) Handles MyBase.. These are installed by default with Visual Studio.EventArgs e) { this.Resources.Win7Look property.

and selecting FolderClosed from the list. clicking the dropdown arrow on the SmallImage editor screen.Note: You don’t have to do this if you are using one of the Office2010 visual styles.   Set the Text property to “File” to add text to the Ribbon application button. This topic illustrates the following: The result of this topic will resemble the following image: 174 . as those already have the rectangular buttons. Set the SmallImage property to FolderClosed by clicking the drop-down arrow.

Sign up to vote on this title
UsefulNot useful