In VB6, there was an issue of not being able to color just the tabs of the tab control. It appears this is still the case in .net, yes? Does anyone have a way to paint the tabs of the tab control, I'm stuck
thanks
kevin
Last edited by kebo; May 3rd, 2005 at 03:43 PM.
Process control doesn't give you good quality, it gives you consistent quality.
Good quality comes from consistently doing the right things.
Vague general questions have vague general answers.
A $100 donation is required for me to help you if you PM me asking for help. Instructions for donating to one of our local charities will be provided.
______________________________
Last edited by kebo : Now. Reason: superfluous typo's
ok, I guess it is still a problem, and I will assume no one has it figured out yet without but a third party control..... so.......
how could I figure out where the tabs are and use a graphic method to color them manually? or
how can I get the area in the image below?
Any idea's?
kevin
Process control doesn't give you good quality, it gives you consistent quality.
Good quality comes from consistently doing the right things.
Vague general questions have vague general answers.
A $100 donation is required for me to help you if you PM me asking for help. Instructions for donating to one of our local charities will be provided.
______________________________
Last edited by kebo : Now. Reason: superfluous typo's
that's how I would do it, but the problem I see is getting the right edge of the last tab since I only want to paint the area to the right of all of the tabs so it doesn't look all corny and stuff
kevin
Process control doesn't give you good quality, it gives you consistent quality.
Good quality comes from consistently doing the right things.
Vague general questions have vague general answers.
A $100 donation is required for me to help you if you PM me asking for help. Instructions for donating to one of our local charities will be provided.
______________________________
Last edited by kebo : Now. Reason: superfluous typo's
Ah, not the actual tabs but the blank area. How about drawing over it using the Graphics namespace? Since it probably doesnt
move or resize it should be easy to cover it with a color or gradient you want.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Ah, not the actual tabs but the blank area. How about drawing over it using the Graphics namespace? Since it probably doesnt
move or resize it should be easy to cover it with a color or gradient you want.
I have worked on it, but don't see why it doesn't work. using mouse move events, it appears the the blank region is part of the form (at least it responds to form events so I have tried this code
VB Code:
Private Sub Form1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles MyBase.Paint
Dim fb As New SolidBrush(Color.Black) 'Me.BackColor)
Dim LastTabRect As Rectangle = TabControl1.GetTabRect(TabControl1.TabPages.Count - 1)
Dim Rect As Rectangle
Rect.Location = New Point(LastTabRect.Right + TabControl1.Left, TabControl1.Top)
Rect.Size = New Size(TabControl1.Right - Rect.Left, LastTabRect.Height)
based on the mousemove feedback, the rectanlge looks like it's in the right spot, but it doesn't paint over the blank area. Can you see what's wrong? Maybe I'm painting on the wrong object?
here's the project too.
thanks
kevin
Process control doesn't give you good quality, it gives you consistent quality.
Good quality comes from consistently doing the right things.
Vague general questions have vague general answers.
A $100 donation is required for me to help you if you PM me asking for help. Instructions for donating to one of our local charities will be provided.
______________________________
Last edited by kebo : Now. Reason: superfluous typo's
Your painting behind the tab control, on the form and not on the tab control.
You need to Inherit in a classs the tab control so you can get access to the OnPaint event. There may be another
way to draw on the control without inheriting. I'll look into it.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
It hosts a large number of custom tabcontrols (source code for VB.NET and C#.NET) which do a variety of things including custom drawing it completely, which is probably what you want.
(It's pretty complicated though, but it's all there in the source code)