Print Page | Close Window

How to change the height of report ctrl row

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=12407
Printed Date: 18 May 2024 at 9:04am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: How to change the height of report ctrl row
Posted By: yycinter
Subject: How to change the height of report ctrl row
Date 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.



Replies:
Posted By: csunita
Date 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!


Posted By: SuperMario
Date 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


Posted By: csunita
Date 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.



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