Print Page | Close Window

Turn off Row Focus Alltogether

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=7553
Printed Date: 22 November 2024 at 7:56am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Turn off Row Focus Alltogether
Posted By: Kurisu
Subject: Turn off Row Focus Alltogether
Date Posted: 08 July 2007 at 7:02am
Howdy,

I thought I had done this before, but can't seem to find it again in the ReportControl or PaintManager.  I just want to disable row highlight selection/focus when the user tries to click a row in my ReportControl.



Replies:
Posted By: znakeeye
Date Posted: 09 July 2007 at 5:06pm
Here is a start:
 
/////////////////////////////
 
#pragma once
class CSolidFocusPaintManager : public CXTPReportPaintManager
{
public:
 CSolidFocusPaintManager(COLORREF textColor = 0x0,
       COLORREF backColor = 0xFFFFFF,
       COLORREF focusColor = 0x0)
 {
  m_textColor = textColor;
  m_backColor = backColor;
  m_focusColor = focusColor;
  m_brush.CreateSolidBrush(focusColor);
 }
 virtual ~CSolidFocusPaintManager() {}
 virtual void DrawFocusedRow(CDC* pDC, CRect rcRow)
 {
  COLORREF clrTextColor = pDC->SetTextColor(m_textColor);
  COLORREF clrBkColor = pDC->SetBkColor(m_backColor);
  
  pDC->FrameRect(rcRow, &m_brush);
  pDC->SetTextColor(clrTextColor);
  pDC->SetBkColor(clrBkColor);
 }
protected:
 CBrush  m_brush;
 COLORREF  m_textColor;
 COLORREF  m_backColor;
 COLORREF  m_focusColor;
};



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