Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Report Control
  New Posts New Posts RSS Feed - Colomn size adjust
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Colomn size adjust

 Post Reply Post Reply
Author
Message
zaksoft View Drop Down
Senior Member
Senior Member
Avatar

Joined: 05 June 2003
Location: Italy
Status: Offline
Points: 162
Post Options Post Options   Thanks (0) Thanks(0)   Quote zaksoft Quote  Post ReplyReply Direct Link To This Post Topic: Colomn size adjust
    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.
 
VS2022 - MFC MBCS Statically linked

XTP 23.1 Static Link

---------------------------------------------------------

Davide Zaccanti - ZakSoft - www.zaksoft.com

Back to Top
zaksoft View Drop Down
Senior Member
Senior Member
Avatar

Joined: 05 June 2003
Location: Italy
Status: Offline
Points: 162
Post Options Post Options   Thanks (0) Thanks(0)   Quote zaksoft Quote  Post ReplyReply Direct Link To This Post Posted: 23 June 2008 at 4:26pm
Any suggestion ? I've also opened a ticket last week...
 
 
VS2022 - MFC MBCS Statically linked

XTP 23.1 Static Link

---------------------------------------------------------

Davide Zaccanti - ZakSoft - www.zaksoft.com

Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
zaksoft View Drop Down
Senior Member
Senior Member
Avatar

Joined: 05 June 2003
Location: Italy
Status: Offline
Points: 162
Post Options Post Options   Thanks (0) Thanks(0)   Quote zaksoft Quote  Post ReplyReply Direct Link To This Post 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.
VS2022 - MFC MBCS Statically linked

XTP 23.1 Static Link

---------------------------------------------------------

Davide Zaccanti - ZakSoft - www.zaksoft.com

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.180 seconds.