Print Page | Close Window

how to set the bkcolor of header if it is pressed

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=24108
Printed Date: 25 April 2024 at 2:58pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: how to set the bkcolor of header if it is pressed
Posted By: yangyanhui
Subject: how to set the bkcolor of header if it is pressed
Date Posted: 02 December 2020 at 2:57am
HI,I have a CXTPREPORTCTRL. When I pressed on the header of it,the background color of the header will be shown in yellow. I want to keep it as the same color as it is when it is not pressed. How can I realize it?I have not find the color to set in XTPPaintManager.
thanks



Replies:
Posted By: mgampi
Date Posted: 02 December 2020 at 3:55am
Did you overwrite GetItemMetrics()?
In my case I can't see yellow colors in header.


-------------
Martin

Product: Xtreme Toolkit v 19.0.0, new Projects v 19.1.0
Platform: Windows 10 v 1909 (64bit)
Language: VC++ 2017


Posted By: yangyanhui
Date Posted: 02 December 2020 at 4:11am
I have overwriten GetItemMetrics in report data and it works good. I do not know how to use it in header rows


Posted By: cpede
Date Posted: 02 December 2020 at 8:26am
It is much easier to use the themes to change the colors in your application consistently. Most of the CodeJock sample projects are using this approach.

Basically set the handle:

XTPResourceImages()->SetHandle(_T("Office2016.dll"), _T("Office2016PowerPointDarkGray.ini"));
CXTPPaintManager::SetTheme(xtpThemeOffice2013);
SendMessageToDescendants(WM_XTP_SETCONTROLTHEME, xtpControlThemeOffice2013);

and specify the control theme:

SetTheme(xtpReportThemeOffice2013, TRUE);

You can then play with the color definitions in Office2016PowerPointDarkGray.ini in the project:

XTToolkit\v19.1.0\Source\Styles\Office2016

compile it and use it in your application.


-------------
Product: Xtreme ToolkitPro (20.3.0)
Platform: Windows 10 (x64)
Language: Visual Studio 2017 (C++)


Posted By: yangyanhui
Date Posted: 03 December 2020 at 3:33am
as codejock set,when the header of a xtpreport is pressed, it will change color. I do not want this function. How can I cancel the function?
thanks



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