Print Page | Close Window

color of selected focus item

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=15882
Printed Date: 29 September 2024 at 1:43pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: color of selected focus item
Posted By: jimmy
Subject: color of selected focus item
Date Posted: 17 December 2009 at 9:10am
Hello,

How can i change the background color of the selected focus item.

if a row is selected, and item has not the focus, the background color
has pPaintManager->m_clrSelectedRow; color.

But there is no color for focus item. how can i change it.

Thanks
   Jimmy




Replies:
Posted By: mdoubson
Date Posted: 17 December 2009 at 5:52pm
smth like this:

ON_NOTIFY(XTP_NM_REPORT_FOCUS_CHANGING, XTP_ID_REPORT_CONTROL, OnFocusChanged)

void
CReportSampleView::OnFocusChanged(NMHDR* pNotifyStruct, LRESULT* result) {

if (pNotifyStruct) {

XTP_NM_REPORTREQUESTEDIT* pnm = (XTP_NM_REPORTREQUESTEDIT*) pNotifyStruct;

if (m_pRecItem) m_pRecItem->SetBackgroundColor(RGB(255,255,255));

if (pnm->pItem) {

pnm->pItem->SetBackgroundColor(RGB(255,128,128));

m_pRecItem = pnm->pItem;

} } }

where CXTPReportRecordItem* m_pRecItem; set as NULL initially


-------------
Mark Doubson, Ph.D.



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