Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Report Control
  New Posts New Posts RSS Feed - How to change the height of report ctrl row
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

How to change the height of report ctrl row

 Post Reply Post Reply
Author
Message
yycinter View Drop Down
Groupie
Groupie


Joined: 06 October 2008
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote yycinter Quote  Post ReplyReply Direct Link To This Post Topic: How to change the height of report ctrl row
    Posted: 11 October 2008 at 10:53am
Hi,

Anyone know about this? how to change the height of report ctrl row?

And the font?

Looks SetFont(CFont *), which inherent from CWnd, doesn't work for me.
Back to Top
csunita View Drop Down
Groupie
Groupie


Joined: 14 July 2008
Status: Offline
Points: 19
Post Options Post Options   Thanks (0) Thanks(0)   Quote csunita Quote  Post ReplyReply Direct Link To This Post Posted: 20 November 2008 at 1:02pm
I am trying to do the same thing, I want to have different heights for different rows. I think you can do this by overriding GetHeight for rows you want to change the height for, but I don't know how to obtain the "CDC* pDC" parameter. Or how to place this row in the report control...

Header file:
CXTPOfficeBorder<CXTPReportControl,false> m_Report;

CPP File - OnInitialUpdate() of the CFormView derived class:

    // Add two columns
     m_Report.GetPaintManager()->SetFixedRowHeight(FALSE);  
    // row 0 - don't want to change height
    CXTPReportRecord* pRec0 = m_Report.AddRecord(new CParamRcrd( _T("Checksum"), strChecksumHex) );
    pRec0->SetEditable(FALSE);
    // row 1 - want to change height.
    // create a new record
    CXTPReportRecord* pRec1 = new CCGSParamRcrd( _T("Precharge"), _T(""));

    // HOW TO associate this record with a row?
    // Change height with GetHeight()?
    // Place the row with InsertRow()?



I tried deriving my own classes for CXTPReportRow and CXTPReportControl, which does change the row height, but gives me the same height for each row!
Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 20 November 2008 at 1:56pm
Here is VB code to do this.

wndReportControl.PaintManager.FixedRowHeight = False
wndReportControl.Columns(COLUMN_SUBJECT).Alignment = xtpAlignmentLeft Or xtpAlignmentWordBreak
Back to Top
csunita View Drop Down
Groupie
Groupie


Joined: 14 July 2008
Status: Offline
Points: 19
Post Options Post Options   Thanks (0) Thanks(0)   Quote csunita Quote  Post ReplyReply Direct Link To This Post Posted: 20 November 2008 at 2:04pm
Having a hard time translating.
Is this to make the row multiline?
If so, I don't think that is my problem. Because I need variable height for the rows.
 
Can I please see the VC++ code?
 
Also, let's say I want the next row to be of a height different from the first two. How would I do that with your example?
 
Thanks.
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.125 seconds.