Print Page | Close Window

set backgroundcolor for CXTPControlStatic

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=13618
Printed Date: 23 June 2025 at 12:55am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: set backgroundcolor for CXTPControlStatic
Posted By: lion
Subject: set backgroundcolor for CXTPControlStatic
Date Posted: 09 March 2009 at 7:57am
Hi there,
how do I set the background color of a control (in this case CXTPControlStatic) ?
I am using CXTPControlPopupUndo with a listbox for the undosteps and an label (which is the CXTPControlStatic) to show information.
I want the label to be separated from the listbox with an horizontal line and the color to be different from the one of the listbox.
Using the VisualStudio2008 Theme that works fine but with other themes it does not. How can I set color/separator? I tried using: "pControlListBoxInfo->SetBeginGroup(TRUE);" which does work for the VS2008 Theme but not for some of the others...
Thanx for some help.
Cheers Björn



Replies:
Posted By: Oleg
Date Posted: 09 March 2009 at 1:20pm
try xtpControlLabel  (CXTPControlLabel) instead.

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


Posted By: lion
Date Posted: 11 March 2009 at 3:15am
Hi,
thanx for your advice.
Unfortunately that did not change anything.
This is what I do so far:

CXTPControlLabel *pControlListBoxInfo = (CXTPControlLabel*)pUndoBar->GetControls()->Add(new CXTPControlLabel(), UNDO_INFO);
pControlListBoxInfo->SetBeginGroup(TRUE);


...(and later I set the text to be displayed on the label)...

How can I set the background color for pControlListBoxInfo ?

Thanx for your help.
Cheers B


Posted By: Oleg
Date Posted: 12 March 2009 at 1:59am
Hi,
 
And you don't see spearator ?? Have work. Do you have ListBox above Label or below ?


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


Posted By: lion
Date Posted: 12 March 2009 at 5:07am
As I found out now, the following was the case:

when using: "XTPSkinManager()->LoadSkin(SkinFileName, SkinColorInfo);"
to not set or set the Skin&Color of the app to values that don't exsist

or

using a "xtpPaneThemeNativeWinXP"-Theme on a Vista machine the described behavior happens.
When setting Theme, Skin and/or Color to valid values everything is fine...

Thank you very much for your help and your time!
It is always good to know that there is someone out there :-)

Cheers B



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