Click here to Skip to main content
15,891,529 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello!

I encountered problems with the default TabControl, and so I made it OwnerDrawFixed. But, it gave it a Windows XP-kind of look.

I saw that you can use VisualStyles to return the flat-look to it, while it is OwnerDrawFixed, but I haven't found any working code.

I was adding a close button to the TabControl TabPages, so that users could easily remove them. But I had to use OwnerDrawFixed for that, and now the TabControl looks ugly. I want to return the flat-look, while also keeping my close button.

Could anyone help?

What I have tried:

I don't know where to start-- Thus, I haven't tried anything :(
Posted
Updated 6-May-20 14:43pm
v2
Comments
BillWoodruff 6-May-20 17:41pm    
"I saw that you can use VisualStyles to return the flat-look to it, while it is OwnerDrawFixed, but I haven't found any working code." Where did you see this, and why didn't it help you ?
The Magical Magikarp 18-May-20 18:45pm    
I saw it on a question on StackOverflow, but I lost the link, so I couldn't post it in the question.

1 solution

There is a rutorial on how to draw a Tab with a close box here: [^] ... also see: [^]
 
Share this answer
 
Comments
The Magical Magikarp 18-May-20 18:47pm    
I already know how to draw a tab with a close box, but I don't know how to use VisualStyles to make it look better.
BillWoodruff 18-May-20 21:53pm    
There are a few examples of custom tab controls here; research them and study their code, and post more specific questions. cheers, Bill

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900