Horizontal scrollbar on report control |
Post Reply |
Author | |
YMHiK
Groupie Joined: 21 January 2009 Location: United States Status: Offline Points: 14 |
Post Options
Thanks(0)
Posted: 28 January 2009 at 2:01pm |
Can somebody explain the logic how report control decides whether to display horizontal scrollbar?
|
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
GetReportCtrl().GetReportHeader()->SetAutoColumnSizing(FALSE) |
|
YMHiK
Groupie Joined: 21 January 2009 Location: United States Status: Offline Points: 14 |
Post Options
Thanks(0)
|
Awesome! Thank you!
And a side question. Is there any logic within control that automatically sets column sizing to TRUE? |
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
Play with MFC ReportSample - you can set all combinations of flags and see result
P.S. Now we have extra internal logic to expose horizontal scrollbar automatically - if you set column's min width and OnSize handler can't fit all visible columns in given size. (Release 13.1)
|
|
znakeeye
Senior Member Joined: 26 July 2006 Status: Offline Points: 1672 |
Post Options
Thanks(0)
|
Lately, using the most recent source code, I noticed a problem when resizing. When I make the control narrower from right, I expect the last column to shrink, and not all columns! Perhaps this call does the trick (cannot test now):
GetReportCtrl().GetReportHeader()->SetAutoColumnSizing(FALSE);
Or do I have to take other things into consideration too?
|
|
PokerMemento - http://www.pokermemento.com/
|
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
You can do it if use call Col->SetAutoSize(FALSE) for all columns except last one. Now you can call
GetReportCtrl().GetReportHeader()->SetAutoColumnSizing(TRUE);
and window resizing will change LAST column width as you expected
|
|
znakeeye
Senior Member Joined: 26 July 2006 Status: Offline Points: 1672 |
Post Options
Thanks(0)
|
By "now" you mean "with latest sources"?
|
|
PokerMemento - http://www.pokermemento.com/
|
|
znakeeye
Senior Member Joined: 26 July 2006 Status: Offline Points: 1672 |
Post Options
Thanks(0)
|
I do think that both resizing techniques should be supported; Explorer style (very ugly if you ask me) and "My" style (last column not affected by autosize-flag).
Just to make sure you don't break existing code :P
|
|
PokerMemento - http://www.pokermemento.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 |