Print Page | Close Window

Horizontal scrollbar on report control

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


Topic: Horizontal scrollbar on report control
Posted By: YMHiK
Subject: Horizontal scrollbar on report control
Date Posted: 28 January 2009 at 2:01pm
Can somebody explain the logic how report control decides whether to display horizontal scrollbar?



Replies:
Posted By: mdoubson
Date Posted: 29 January 2009 at 9:28pm

GetReportCtrl().GetReportHeader()->SetAutoColumnSizing(FALSE)



Posted By: YMHiK
Date Posted: 30 January 2009 at 3:57pm
Awesome! Thank you!

And a side question. Is there any logic within control that automatically sets column sizing to TRUE?


Posted By: mdoubson
Date Posted: 11 February 2009 at 5:47pm
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)


-------------
Mark Doubson, Ph.D.


Posted By: znakeeye
Date Posted: 28 August 2009 at 7:41am

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/


Posted By: mdoubson
Date Posted: 30 August 2009 at 7:11pm
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


-------------
Mark Doubson, Ph.D.


Posted By: znakeeye
Date Posted: 31 August 2009 at 3:02am
By "now" you mean "with latest sources"?

-------------
PokerMemento - http://www.pokermemento.com/


Posted By: znakeeye
Date Posted: 31 August 2009 at 3:03am
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/



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