Print Page | Close Window

XTPReportRow

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=18649
Printed Date: 04 May 2024 at 11:00pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: XTPReportRow
Posted By: sodind
Subject: XTPReportRow
Date Posted: 12 July 2011 at 4:58pm
Hello,
How can I set row's size (height)? Is this possible?
Thanks.



Replies:
Posted By: mgampi
Date Posted: 17 December 2014 at 4:12pm
I'm also searching for this!
I want to use fixed row height, but it should be increased by several px.
Can't find a way how to do this.
SetFixedRowHeight(FALSE) can't be used, because scrolling performance is then really poor!



-------------
Martin

Product: Xtreme Toolkit v 19.0.0, new Projects v 19.1.0
Platform: Windows 10 v 1909 (64bit)
Language: VC++ 2017


Posted By: olebed
Date Posted: 18 December 2014 at 9:39am
Hello Martin,

This is possible through   CXTPReportPaintManager::m_nRowHeightDefault   variable. But to apply changes you must reset text font Wacko.  Also for better appearance add alignment for every column  xtpColumnTextVCenter.

int CSomeView::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CXTPReportView::OnCreate(lpCreateStruct) == -1)
return -1;

CXTPReportControl& wndReport = GetReportCtrl();

 wndReport.GetPaintManager()->m_nRowHeightDefault += 5;
LOGFONT lf;
wndReport.GetPaintManager()->GetTextFont()->GetLogFont(&lf);
wndReport.GetPaintManager()->SetTextFont(lf);

...

for (nColumn=0; nColumn<nColumnCount; nColumn++)
{
CXTPReportColumn *pColumn = new CXTPReportColumn(nColumn, _T(""), 90, TRUE);
pColumn = wndReport.AddColumn(pColumn);
pColumn->SetAlignment(xtpColumnTextVCenter);
}
...


Regards,
 Oleksandr Lebed


Posted By: mgampi
Date Posted: 18 December 2014 at 9:44am
Hi;

Meanwhile I found a better solution:
I created my own CXTPReportPaintManager and wrote a SetRowHeight() function that I call in the constructor of my CXTPReportControl derived class. That's it.
void FixedGroupHeightPaintManager::SetRowHeight( int Height ) {
  m_nRowHeight=Height;
}



-------------
Martin

Product: Xtreme Toolkit v 19.0.0, new Projects v 19.1.0
Platform: Windows 10 v 1909 (64bit)
Language: VC++ 2017


Posted By: Marco1
Date Posted: 23 December 2014 at 5:27am
Meanwhile, we created our own 15.3.2 version with own fixes and enhancements (some merges of the 16.x branch).
Things like your fix above go direct inside our version. Thanx.
Unfortunately all 16.x. wasn't and isn't usable in our product. The way we've chosen is to stay by our own 15.3.2 version and 2010 themes for the next years and maintain the toolkit on our own. 15.3.1 is a very stable and IMHO the best version of the toolkit.
Let's see how things here play out...



-------------
Product: XTP 18.3.0 on VS 2017
Platform: VS 2017 / Windows 10 (64bit)



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