Home » U++ Library support » Look and Chameleon Technology » look of ctrl with styled horz and vert scrollbars
Re: look of ctrl with styled horz and vert scrollbars [message #37840 is a reply to message #37829] |
Fri, 16 November 2012 21:32 |
|
bushman
Messages: 134 Registered: February 2009
|
Experienced Member |
|
|
Hi, Honza, please help me out with this:
dolik.rce wrote on Fri, 16 November 2012 03:44 | ... you can make your own class which would inherit from ScrollBars and override FramePaint() - it is only three lines of code
|
If you mean Scrollbar.cpp code
void ScrollBars::FramePaint(Draw& w, const Rect& r) {
if(x.IsShown() && y.IsShown() && !box) {
int h = ScrollBarSize();
w.DrawRect(r.right - h, r.bottom - h, h, h, SColorFace);
}
}
Ok, but how to do it? First, let us check if I got your point right: let's say I create a class that inherits from ScrollBars (MyScrollBars), override FramePaint method and then make my Ctrls use it instead ScrollBars directly. If that's what you mean, TreeCtrl, for one, declares its ScrollBars sb member as private. Therefore I can not replace it by MyScrollbars. I'm sorry, but I don't follow you. Besides, ArrayCtrl, for instance, does not use ScrollBars. Can you elaborate on that?
dolik.rce wrote on Fri, 16 November 2012 03:44 | Alternative and probably better solution would be to modify ScrollBars to so that it can figure out the correct color from the style of the scrollbars it contains. Shouldn't be difficult too.
|
And what about that? Can you help me out on how to do it, though?
Thanks!
[Updated on: Fri, 16 November 2012 21:34] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Sun Jun 09 11:18:33 CEST 2024
Total time taken to generate the page: 0.00864 seconds
|