Colomn size adjust |
Post Reply |
Author | |
zaksoft
Senior Member Joined: 05 June 2003 Location: Italy Status: Offline Points: 162 |
Post Options
Thanks(0)
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 |
|
zaksoft
Senior Member Joined: 05 June 2003 Location: Italy Status: Offline Points: 162 |
Post Options
Thanks(0)
|
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 |
|
sserge
Moderator Group Joined: 01 December 2004 Status: Offline Points: 1297 |
Post Options
Thanks(0)
|
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 |
|
zaksoft
Senior Member Joined: 05 June 2003 Location: Italy Status: Offline Points: 162 |
Post Options
Thanks(0)
|
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 |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |