Hi Telerik
I am trying to set the color of the tab on unselected document windows to "MistyRose" and the tab on the currently selected document window to "Snow" using the following code
And
The result is hit and miss with the color changes working sometimes and at others being a mixture of the 2. Any ideas as to why this might be happening?
Regards
Ian
I am trying to set the color of the tab on unselected document windows to "MistyRose" and the tab on the currently selected document window to "Snow" using the following code
rDockModelPackage.ActiveWindowChanging+=new DockWindowCancelEventHandler(rDockModelPackage_ActiveWindowChanging); rDockModelPackage.ActiveWindowChanged += new DockWindowEventHandler(rDockModelPackage_ActiveWindowChanged); } private void rDockModelPackage_ActiveWindowChanged(object sender, DockWindowEventArgs e) { SizeAndColorSelectedDocWindowTab(e.DockWindow.TabStrip.TabStripElement, Color.Snow, Color.MistyRose); } private void rDockModelPackage_ActiveWindowChanging(object sender, DockWindowCancelEventArgs e) { SizeAndColorUnSelectedDocWindowTab(e.OldWindow.TabStrip.TabStripElement, Color.Snow, Color.MistyRose); }
private void SizeAndColorSelectedDocWindowTab(RadTabStripElement win, Color lightColour, Color darkColour) { ((FillPrimitive)win.Children[0].Children[0].Children[0].Children[0].Children[0]).BackColor = lightColour; ((FillPrimitive)win.Children[0].Children[0].Children[0].Children[0].Children[0]).BackColor2 = lightColour; ((FillPrimitive)win.Children[0].Children[0].Children[0].Children[0].Children[0]).BackColor3 = lightColour; ((FillPrimitive)win.Children[0].Children[0].Children[0].Children[0].Children[0]).BackColor4 = lightColour; } private void SizeAndColorUnSelectedDocWindowTab(RadTabStripElement win, Color lightColour, Color darkColour) { ((FillPrimitive)win.Children[0].Children[0].Children[0].Children[0].Children[0]).BackColor = darkColour; ((FillPrimitive)win.Children[0].Children[0].Children[0].Children[0].Children[0]).BackColor2 = darkColour; ((FillPrimitive)win.Children[0].Children[0].Children[0].Children[0].Children[0]).BackColor3 = darkColour; ((FillPrimitive)win.Children[0].Children[0].Children[0].Children[0].Children[0]).BackColor4 = darkColour; }The result is hit and miss with the color changes working sometimes and at others being a mixture of the 2. Any ideas as to why this might be happening?
Regards
Ian