> Let's suppose, your Image is a square (same width and height). In
> your Scroll class, you can implement the virtual resize() method:
> 
> Scroll::resize(int X, int Y, int W, int H)
> {
>    Fl_Scroll::resize(X,Y,W,H);                // resize Scroll widget
>    scroll_to(0,0);                    // makes things easier; YMMV
>    img->resize(X,Y,max(W,H),max(W,H));        // or something 
> like that
> }
> 
> where *img is your Image i.
> 
> Thus, the Image i would always fill the full Scroll area, and
> horizontal and vertical scrollbars would appear as needed.
> 
> Of course, your Image class would need to be able to resize
> itself accordingly.
> 
> Is that what you want to do?


That sounds like it might be it, I'll need to try that later on.

I think it's the trick with the resize and propagating that to the child
that I was missing...

What I want is that the child can resize horizontally as the window is
resized, but this will result in the child vertical dimension changing,
so I need to propagate that changed vertical size back up to the
scroll...

Cheers,
-- 
Ian


SELEX Sensors and Airborne Systems Limited
Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14 
3EL
A company registered in England & Wales.  Company no. 02426132
********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************

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

Reply via email to