Themed horizontal scrollbar?
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=13451
Printed Date: 10 May 2024 at 12:22pm Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com
Topic: Themed horizontal scrollbar?
Posted By: shineryu
Subject: Themed horizontal scrollbar?
Date 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?
|
Replies:
Posted By: shineryu
Date Posted: 19 February 2009 at 11:22pm
No reply?
I modified ReportSample, and I get below:
Very nice!
Only added about ten lines of code!
|
Posted By: mdoubson
Date Posted: 20 February 2009 at 4:09pm
Very good - could you share this modifications with everybody? Should we modify Report Core for this case or app-level modifications is enough?
------------- Mark Doubson, Ph.D.
|
Posted By: shineryu
Date Posted: 21 February 2009 at 6:04am
I suggest codejock modify its core, and it's very simple!
the code is here https://forum.codejock.com/uploads/20090221_060401_ReportSampleEx-.rar - uploads/20090221_060401_ReportSampleEx-.rar
|
Posted By: mdoubson
Date Posted: 22 February 2009 at 1:37pm
Right - it is simple and it's works. We will update our samples. Thanks!
------------- Mark Doubson, Ph.D.
|
Posted By: securigy
Date Posted: 02 April 2009 at 7:21pm
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;
}
|
Posted By: mdoubson
Date Posted: 02 April 2009 at 11:58pm
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
------------- Mark Doubson, Ph.D.
|
Posted By: securigy
Date Posted: 03 April 2009 at 4:15am
mdoubson wrote:
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 |
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...
|
Posted By: mdoubson
Date Posted: 03 April 2009 at 7:20pm
Make some research about Dialogs and Scrollbars - e.g. in CodeProject
------------- Mark Doubson, Ph.D.
|
Posted By: mdoubson
Date Posted: 18 May 2009 at 6:43pm
The problems with scrollbar and Office2007 theme is not related to Report Control - see snapshot from Skin Sample app
------------- Mark Doubson, Ph.D.
|
|