Here is mi inherited TabStripRenderer class code, but now, how can I get the actual ToolWindow object? I have my own inherited ToolWindow and I want to set a property TabColor to set this the ToolWindow tab color.
In some cases there are painting errors on my window if I have two or more tabs with different colors, but if I close the different color tabs the painting errors dissapears, is there any reason?
Thanks![Modified at 10/25/2006 04:28 AM]
In some cases there are painting errors on my window if I have two or more tabs with different colors, but if I close the different color tabs the painting errors dissapears, is there any reason?
Thanks!
Imports ActiproSoftware.Drawing
Imports ActiproSoftware.UIStudio.TabStrip
Imports System.Drawing
Public Class RendererGrupo
Inherits Office2003DocumentWindowTabStripRenderer
Public Overrides Sub DrawTabStripTab(ByVal e As System.Windows.Forms.PaintEventArgs, ByVal bounds As Rectangle, ByVal tabStripTab As TabStripTab)
Dim color1 As Color = SystemColors.ControlLight
Dim color2 As Color = SystemColors.ControlLightLight
If tabStripTab.TabStripPage.Text.Contains("test") Then
color2 = Color.LightGreen
End If
'I wan't to access the toolwindow here, but I only have the tabStripTab.TabStripPage.Text, any other method?
'If tabStripTab.TabStripPage.Tag IsNot Nothing Then
' color2 = DirectCast(tabStripTab.TabStripPage.Tag, Color)
'End If
DirectCast(Me.TabStripTabSelectedBackgroundFill, SolidColorBackgroundFill).Color = color2
DirectCast(Me.TabStripTabUnselectedBackgroundFill, TwoColorLinearGradient).StartColor = color1
DirectCast(Me.TabStripTabUnselectedBackgroundFill, TwoColorLinearGradient).EndColor = color2
MyBase.DrawTabStripTab(e, bounds, tabStripTab)
End Sub
End Class