> Hi guys,
>
> Can anyone help me with this Fl_Scrollbar issue?
>
> - I have a window of size 100x100
> - Bellow the windows I have a scrollbar of width = 100
> - In my windows I need to draw an object of size 125
> - For simplicity the object remembers of how much it was scrolled
> - My goal is to have the scroll bar display the correct amount of free
> space to execute the correct scrolling
>
> I've written a function to set the correct value() to the scroll bar
> every time a scroll is done or when the object change it's size:
>
> void window::fixScrollbars()
> {
>    const size_t rw = w()
>    const size_t dw = object->width();
[...]

One thing that may possibly be tripping you up is that the
width of a window may change when it's shown, so your calculations
that rely on w() may be off the first time you use it.  In
particular, on the XP box I'm using now, if I create a window
of size 100,100, its w() is 100 when exiting the ctor, but after
show() it's 115.

Of course, this may be totally irrelevant for you; I can't tell.

HTH,
Stan


_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to