Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Report Control
  New Posts New Posts RSS Feed - Horizontal scrollbar on report control
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Horizontal scrollbar on report control

 Post Reply Post Reply
Author
Message
YMHiK View Drop Down
Groupie
Groupie
Avatar

Joined: 21 January 2009
Location: United States
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote YMHiK Quote  Post ReplyReply Direct Link To This Post Topic: Horizontal scrollbar on report control
    Posted: 28 January 2009 at 2:01pm
Can somebody explain the logic how report control decides whether to display horizontal scrollbar?
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 29 January 2009 at 9:28pm

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

Back to Top
YMHiK View Drop Down
Groupie
Groupie
Avatar

Joined: 21 January 2009
Location: United States
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote YMHiK Quote  Post ReplyReply Direct Link To This Post 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?
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post 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)
Back to Top
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post 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/
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post Posted: 31 August 2009 at 3:02am
By "now" you mean "with latest sources"?
PokerMemento - http://www.pokermemento.com/
Back to Top
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post 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/
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.172 seconds.