We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

How to customize the appearance of the TabControlAdv while ‘HotTracking’?

You can customize the appearance of the TabControlAdv while HotTracking. This can be achieved by handling the event, DrawItem in the TabControlAdv. The argument, DrawTabEventArgs gets the data for the Syncfusion.Windows.Forms.Tools.TabControlAdv.DrawItem event handler in the TabControlAdv. Within this event handler, check whether the TabItem is being HotTracked, and when it is, set the desired forecolor and backcolor to the DrawTabEventArgs object.

 

The arguments contain all the necessary information that helps the user to paint the specified tab item. The following are the properties and functions.

 

Properties:

  1. BackColor - Gets or sets the background color of the specified tab item.
  2. ForeColor - Gets or sets the forecolor of the specified tab item text.
  3. Font - Gets or sets the font of the specified tab item.
  4. Bounds - Gets or sets the bounds of the specified tab item. They include the space for the border.
  5. BoundsInterior - Gets or sets the bounds of the specified tab item without having space for the borders.
  6. Graphics - Returns the graphics surface to draw the tab item.
  7. Index - Returns the index value of the tab item.
  8. DrawItemState - Gets or sets the item state.
  9. TextBrush - Gets or sets the brush to draw the text.

 

Functions:

  1. DrawBackground - Draws the background.
  2. DrawBorders - Draws the borders within the bounds specified.
  3. DrawInterior - Draws the text and image within the bounds specified.

 

The following code example demonstrates the same.

C#

 

VB

 

Note: The property named “HotTrack” in TabControlAdv changes the appearance of the TabPageAdv when the mouse passes over them.


Figure 1: Before enabling the HotTrack property

Figure 2: After enabling the HotTrack property

Figure 3: Before customizing the appearance of the TabPageAdv when HotTrack property is enabled

Figure 4: After customizing the forecolor and backcolor of the TabPageAdv when HotTrack property is enabled

Figure 5: After customizing the appearance, HotTrack enabled and Forecolor, BackColor and Font specified

Sample Links:

C#: TabControlAdv_HotTrack_C#

VB: TabControlAdv_HotTrack_VB

Article ID: Published Date: Last Revised Date: Platform: Control:
1194 04/30/2011 10/14/2015 Windows Forms TabControlAdv
Did you find this information helpful?
Add Comment
You must log in to leave a comment

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.