Print Page | Close Window

TabControl color question

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Suite Pro
Forum Description: Topics Related to Codejock Suite Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=5564
Printed Date: 17 November 2024 at 5:41am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: TabControl color question
Posted By: Majek
Subject: TabControl color question
Date Posted: 20 November 2006 at 2:31pm
Hi, i'm trying to design a "themed" program that allows the user to customize the fonts/colors/etc of the forms. I used the Office XP theme on the CommandBars and it allowed me to set the special colors of the menu to make it fully customizable. The only thing that doesn't match is the TabControl, I tried .PaintManager.Color = XTPTabColorStyle.xtpTabColorOffice2003 but it doesn't have a SetSpecialColor function. I saw a few things in the XtremeSuiteControls namespace but I couldn't figure out how to use them. So in short, is it possible to set user defined custom colors on a TabControl? I'm using version 10.1.



Replies:
Posted By: Oleg
Date Posted: 21 November 2006 at 12:50am
Hi,
yes, you can customize colors.
 
TabControl.PaintManager.ColorSet.ControlFace = ...
 
but not sure if it was available in 10.1 :(


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: Majek
Date Posted: 21 November 2006 at 3:06pm
Aha yes, that worked thanks alot  


Posted By: Majek
Date Posted: 21 November 2006 at 3:16pm
This was my code for anyone else who might have the same question (VB 2005)
 
With TabControl
    .InsertItem(0, "Connection", frmConnection.Handle.ToInt32, 0)
    .InsertItem(1, "Chat", frmChat.Handle.ToInt32, 0)
    .InsertItem(2, "Transfer", frmTransfer.Handle.ToInt32, 0)
    .InsertItem(3, "Settings", frmSettings.Handle.ToInt32, 0)
    .DrawFocusRect = False
End With
 
With TabControl.PaintManager
    .Appearance = XTPTabAppearanceStyle.xtpTabAppearancePropertyPage2003
    .BoldSelected = True
    .Color = XTPTabColorStyle.xtpTabColorOffice2003
    .Layout = XTPTabLayoutStyle.xtpTabLayoutSizeToFit
    .Position = XTPTabPosition.xtpTabPositionTop

    .ColorSet.ControlFace = Convert.ToUInt32(ColorTranslator.ToWin32(Color.Red))
End With



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net