![]() |
Themed horizontal scrollbar? |
Post Reply ![]() |
Author | |
shineryu ![]() Groupie ![]() Joined: 02 April 2006 Location: China Status: Offline Points: 33 |
![]() ![]() ![]() ![]() ![]() Posted: 19 February 2009 at 8:32am |
In ReportSample, we have a themed vertical scrollbar, but the horizontal scrollbar is not themed!
Can I have a Themed horizontal scrollbar?
![]() |
|
![]() |
|
shineryu ![]() Groupie ![]() Joined: 02 April 2006 Location: China Status: Offline Points: 33 |
![]() ![]() ![]() ![]() ![]() |
No reply?
I modified ReportSample, and I get below:
![]() Very nice!
Only added about ten lines of code!
|
|
![]() |
|
mdoubson ![]() Senior Member ![]() ![]() Joined: 17 November 2008 Status: Offline Points: 1705 |
![]() ![]() ![]() ![]() ![]() |
Very good - could you share this modifications with everybody? Should we modify Report Core for this case or app-level modifications is enough?
|
|
![]() |
|
shineryu ![]() Groupie ![]() Joined: 02 April 2006 Location: China Status: Offline Points: 33 |
![]() ![]() ![]() ![]() ![]() |
I suggest codejock modify its core, and it's very simple!
the code is hereuploads/20090221_060401_ReportSampleEx-.rar
|
|
![]() |
|
mdoubson ![]() Senior Member ![]() ![]() Joined: 17 November 2008 Status: Offline Points: 1705 |
![]() ![]() ![]() ![]() ![]() |
Right - it is simple and it's works. We will update our samples. Thanks!
|
|
![]() |
|
securigy ![]() Groupie ![]() Joined: 23 November 2007 Status: Offline Points: 41 |
![]() ![]() ![]() ![]() ![]() |
I tried to use this sample, however my CReportControl::CXTPReportCtrl is placed directly on the dialog so I had to change the code since I dont have a View. Unfortunately, vertical scroll bar did not change, and horizonal bar not displayed at all... Any ideas?
void CReportControl::SetScrollBarStyle(XTPScrollBarStyle scrollStyle){
m_wndVScrollBar.Create(WS_CHILD | WS_VISIBLE | SBS_VERT, CRect(0, 0, 0, 0), this, 100);m_wndVScrollBar.SetScrollBarStyle(xtpScrollStyleOffice2007Dark); m_wndHScrollBar.Create(WS_CHILD | WS_VISIBLE | SBS_HORZ, CRect(0, 0, 0, 0), this, 100);m_wndHScrollBar.SetScrollBarStyle(xtpScrollStyleOffice2007Dark); CXTPScrollBar* pVScrollBar = (CXTPScrollBar*)GetScrollBarCtrl(SBS_VERT); CXTPScrollBar* pHScrollBar = (CXTPScrollBar*)GetScrollBarCtrl(SBS_HORZ);
pVScrollBar = &m_wndVScrollBar; pHScrollBar = &m_wndHScrollBar; } |
|
![]() |
|
mdoubson ![]() Senior Member ![]() ![]() Joined: 17 November 2008 Status: Offline Points: 1705 |
![]() ![]() ![]() ![]() ![]() |
Who is the owner of m_wndVScrollBar and m_wndHScrollBar? Dialog? You need to call ScrollBar assignment operator - not just pointer = ...
Example:
in header file
CXTPCommandBarScrollBarCtrl m_wndVScrollBar; CXTPCommandBarScrollBarCtrl m_wndHScrollBar; in implementation
m_wndVScrollBar.Create(WS_CHILD | WS_VISIBLE | SBS_VERT, CRect(0, 0, 0, 0), this, 100);
m_wndVScrollBar.SetScrollBarStyle(xtpScrollStyleOffice2007Dark); SetScrollBarCtrl(&m_wndVScrollBar); // againg - set for View! m_wndHScrollBar.Create(WS_CHILD | WS_VISIBLE | SBS_HORZ, CRect(0, 0, 0, 0), this, 100); m_wndHScrollBar.SetScrollBarStyle(xtpScrollStyleOffice2007Dark); It works and both bars theme-enabled.
Should be similar in dialog |
|
![]() |
|
securigy ![]() Groupie ![]() Joined: 23 November 2007 Status: Offline Points: 41 |
![]() ![]() ![]() ![]() ![]() |
the owner of the scrollbar is CReportControl::CXTpReportCtrl and there is no SetScrollBar method in XTPReportCtrl - I dont have a view since CReportControl is a member of a dialog... that's exactly what my problem was... how do I go about it? I also did not realize that scrollbars should be of CXTPCommandBarScrollBarCtrl and not CXTScrollBar...
|
|
![]() |
|
mdoubson ![]() Senior Member ![]() ![]() Joined: 17 November 2008 Status: Offline Points: 1705 |
![]() ![]() ![]() ![]() ![]() |
Make some research about Dialogs and Scrollbars - e.g. in CodeProject |
|
![]() |
|
mdoubson ![]() Senior Member ![]() ![]() Joined: 17 November 2008 Status: Offline Points: 1705 |
![]() ![]() ![]() ![]() ![]() |
![]() The problems with scrollbar and Office2007 theme is not related to Report Control - see snapshot from Skin Sample app
|
|
![]() |
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 |