954,510 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Custom Tab control

Hello all,

I need your help in the following.

Tab.JPG

I have created a custom tab control as seen in the attached image. Please tell me how to extend the white color in the circled area in the image for the selected tab.

Attachments Tab.JPG 14.94KB
shelly1234
Newbie Poster
11 posts since Sep 2010
Reputation Points: 10
Solved Threads: 0
 

I haven't done it before but my guess would be writing an event handler for the tab control's DrawItem event that styles the tab the way you want. Anyone know of a better way?

darkagn
Veteran Poster
1,197 posts since Aug 2007
Reputation Points: 404
Solved Threads: 200
 

The Onpaint event of the TabControl?

ddanbe
Senior Poster
3,829 posts since Oct 2008
Reputation Points: 2,070
Solved Threads: 661
 

Cheap and fast method is to pad the text with spaces on both sides (to keep it centered).

Momerath
Nearly a Senior Poster
3,384 posts since Aug 2010
Reputation Points: 1,232
Solved Threads: 558
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You