• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1627
  • Last Modified:

TabControl OwnerDraw and keep the windows theme...

Hi!

How can I ownerdraw the text of the tabpages of a TabControl and still keep the background theme?

I'm using .net framework 2.0, thanks!

Alex :p
0
Alexandre Simões
Asked:
Alexandre Simões
  • 3
  • 2
1 Solution
 
Bob LearnedCommented:
1) Are you talking about OwnerDrawFixed = true?

2) Or rolling your own TabControl?

Bob
0
 
Alexandre SimõesManager / Technology SpecialistAuthor Commented:
Hi...
Option 1, OwnerDrawFixed = true.
But the solution is quite the same for both scenarios.

.Net Framework have a new NameSpace called: System.Windows.Forms.VisualStyles
In it you can find the VisualStyleRenderer object, and multiple Elements to use on your controls, either inherited or brand new.

You can find a nice demo by M$ at:
http://msdn2.microsoft.com/en-us/library/system.windows.forms.visualstyles.visualstyleelement.tab.tabitem.aspx


Thanks,
Alex
0
 
Bob LearnedCommented:
Cool b-)  *GRIN*

So, now are you asking how to render the TabPage XP theme when using VisualStyleRenderer?

Bob
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
Alexandre SimõesManager / Technology SpecialistAuthor Commented:

Nop... done that...
I'm done with this one!
Just didn't knew about that VisualStyles Namespace... It was about time...

I'll ask to delete this one.

Thanks!
Alex
0
 
Bob LearnedCommented:
Keep this question.

Bob
0
 
ee_ai_constructCommented:
Closed, 500 points refunded.
ee_ai_construct
Community Support Moderator
replacement part #xm34
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now