Print Page | Close Window

Colomn size adjust

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=10991
Printed Date: 15 May 2024 at 1:02pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Colomn size adjust
Posted By: zaksoft
Subject: Colomn size adjust
Date Posted: 11 June 2008 at 7:01am
 
I've inserted a ListCtrl control into a CDialog to let user choose some options. User cannot resize or reorder column. Only numbers of copies can be edited or checkbox can be clicked to change print options.
 
Problems:
1) I've not found an option to disable group reorder (they are fixed and set using ..pColumns->GetGroupsOrder()->Add( pCol);..)
2) I need to set a smaller height for group (I've found GetRowsHeight(..) but not a function to set)
3) I'm not able to have all column shown correctly (I've also tryed to reduce indent gap to fit all columns as you can see in previous picture) . Autosize is set and if I move a group the column are resized as expeted (also using standard gap, no matter just move an item in group box and release it also in same position). No state is saved or restored, before and afterl filling (and using Populate() I've tryed to insert AdjustLayout() with no result.
 
TIA.
 


-------------
VS2008 SP1 - VS2010 SP1 - VS2012 - MFC MBCS Statically linked
XTP 15.3.1 Static Link
---------------------------------------------------------
Davide Zaccanti - ZakSoft - www.zaksoft.com



Replies:
Posted By: zaksoft
Date Posted: 23 June 2008 at 4:26pm
Any suggestion ? I've also opened a ticket last week...
 
 


-------------
VS2008 SP1 - VS2010 SP1 - VS2012 - MFC MBCS Statically linked
XTP 15.3.1 Static Link
---------------------------------------------------------
Davide Zaccanti - ZakSoft - www.zaksoft.com


Posted By: sserge
Date Posted: 23 June 2008 at 7:23pm
Hi Davide,

1) Try using option: wndReport.GetReportHeader()->AllowColumnReorder(FALSE);

2) There are a few methods to change height of some row. An easiest way to change height of a group row will be to override implementation of the method CXTPReportPaintManager::GetRowHeight, with your personal method logic.
You can both whether to update sources of a toolkit (and rebuild it of course), or create a descendant Paint Manager class and override only this method. SetPaintManager will help to setup your changed paint manager.

3) Could you please describe actions which illustrate this issue?

--
Regards,
Serge


Posted By: zaksoft
Date Posted: 24 June 2008 at 3:13am
1) I'm already using

m_wndReportCtrl.GetReportHeader()->AllowColumnRemove( FALSE);

m_wndReportCtrl.GetReportHeader()->AllowColumnReorder(FALSE);

m_wndReportCtrl.GetReportHeader()->SetAutoColumnSizing( TRUE);

m_wndReportCtrl.AdjustLayout();

After that I insert all rows ( group are already define as long as column are inserted as all layout is fixed and know at design time)

pCol = m_wndReportCtrl.AddColumn( new CXTPReportColumn( ...));

pColumns->GetGroupsOrder()->Add( pCol);

 
 
2) This is the least significant (has only visual impact), so I'll try your suggestion in the future... hope you can provide a standard SetRowHeight(..) meanwhile..
 
3) It seems that autosize is not working, last columns are not visible and cutted of.. as long as I move a group (even if dropped in the same position), in this case an auto arrangement is done and all columns fits into the window as expected. I need a way to call such function without asking the user to move group to have latest check box column visible...
 
TIA
 
P.S. I've found a simple workaround for (3), I save last pCol to be used in group and I call pColumns->GetGroupsOrder()->Add( ..) after populate()... But something must be adjusted and probably is related to defining groups before populating report... maybe you dont take in account indentetion ? And also re-calling ..AllowColumnReorder( FALSE) after populate leave the report in a state in witch user can swap groups.


-------------
VS2008 SP1 - VS2010 SP1 - VS2012 - MFC MBCS Statically linked
XTP 15.3.1 Static Link
---------------------------------------------------------
Davide Zaccanti - ZakSoft - www.zaksoft.com



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