Displaying ToolTips for Tabs
This topic demonstrates how to create custom ToolTips for the tabs of a C1TabControl control. When the ToolTip property is set to a string, users will be able to see a brief description of the tab by hovering over it with their cursor. In this topic, you will create a ToolTip in Design view, in Source view, and in code.
In Design View
Complete the following steps:
1. Click
C1TabControl's smart tag () to open the C1TabControl Tasks menu and then select
TabControl Designer.
The C1TabControl Designer Form appears.
2. Use the Add Child
Item button to add a tab to your C1TabControl.
3. In the treeview, select Tab01 to reveal its list of properties.
4. Locate the ToolTip property and type "Click this tab for more information." into its text box.
5. Press OK to close the C1TabControlDesigner Form and then run the project.
In Source View
To add a hierarchy of tabs in Source view, add ToolTip="Click this tab for more information" to the <cc1:C1TabPage1> tags. Your XHTML will resemble the following:
<cc1:C1TabPage ID="TabPage1" runat="server" Text="TabPage01" ToolTip="Click this tab for more information.">
In Code
Complete the following steps:
1. Import the following namespace into your project:
Imports C1.Web.UI.Controls.C1TabControl
• C#
using C1.Web.UI.Controls.C1TabControl;
2. Add the following code to your Page_Load event:
C1TabPage1.ToolTip = "Click this tab for more information."
• C#
C1TabPage1.ToolTip = "Click this tab for more information.";
3. Run the program
This Topic Illustrates the Following:
Using theToolTip property, you can easily create custom ToolTips that will appear when your users mouse over tabs. Once you've built your project, mouse over the first tab in the C1TabControl control and notice the ToolTip that appears. The result will resemble the following image:
|