Print Page | Close Window

How to set xtpbutton backcolor dynomic

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=13543
Printed Date: 27 September 2024 at 10:10am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: How to set xtpbutton backcolor dynomic
Posted By: crag
Subject: How to set xtpbutton backcolor dynomic
Date Posted: 02 March 2009 at 4:04am

if set xtpbutton theme to office2007 blue.

Now I want to set backcolor to customer color.I try to set like this:
 
 CXTPButtonOffice2007Theme* pTheme2007 = new CXTPButtonOffice2007Theme;
 pTheme2007->m_crBack = RGB(0,0,0);
 pTheme2007->m_crBackChecked = true;
 m_btn1.SetTheme(pTheme2007);
 
No effect.How can I do,please,thanks.



Replies:
Posted By: crag
Date Posted: 02 March 2009 at 9:28pm
Please help me


Posted By: jimmy
Date Posted: 04 March 2009 at 5:07am
Debug in CXTPButtonOffice2007Theme::DrawButtonBackgroun function and see
what CXTPButton will do.

Jimmy



Posted By: crag
Date Posted: 05 March 2009 at 11:03pm
Yes,thanks。
 
New Class CXTPButtonOffice2007ThemeGrn,then override DrawButtonBackgroun function .And call SetTheme with this class.That's OK.
 
But a new problem.Maybe a CXTPbutton's bug.  If want to set a button that I pressed,no effect.then press another button,means setfocus another button ,ok.  The problem is : Can't set a focused button to a theme.
 
How can I do ?



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