Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Report Control
  New Posts New Posts RSS Feed - How to show non-editable rows as grayed-out
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

How to show non-editable rows as grayed-out

 Post Reply Post Reply
Author
Message
RHolmes View Drop Down
Newbie
Newbie


Joined: 24 June 2008
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote RHolmes Quote  Post ReplyReply Direct Link To This Post Topic: How to show non-editable rows as grayed-out
    Posted: 24 June 2008 at 1:37pm
Hello,
  I am using a CXTPReportControl in my project (and one of the columns in the report is a check box.)
  Some columns are editable and some aren't.
  I have overridden the OnClick and SetChecked functions for the check box report item and control the functions using a isEnabled variable. I hope that is correct way to control check box behavior.

  I want to be able to visually show that some rows are disabled (not editable). I would like to be able to show the rows grayed-out. Is there an easy way to do this?

Thanks.
Back to Top
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post Posted: 08 July 2008 at 6:40am
Set the pMetric->clrBackground in CYourReportCtrl::GetItemMetrics, depending on pItem->isEnabled. I believe you can find such code in the samples.
Back to Top
RHolmes View Drop Down
Newbie
Newbie


Joined: 24 June 2008
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote RHolmes Quote  Post ReplyReply Direct Link To This Post Posted: 08 July 2008 at 4:47pm
Thank you very much. Your suggestion was very helpful and answered my question.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.188 seconds.