Hi,
With the following code I tried to override the Fl_Window::resize () method to 
set an arbitrary aspect ratio (for example a fixed width). The problem is that 
the window frame doesn't get that size, only the canvas seems to do it.
Can some one figure out what I'm doing wrong?
Thanks Very Much.

David


#include <FL/Fl.H>
#include <FL/Fl_Window.H>

class MyWindow : public Fl_Window
        {
        public:
                MyWindow (int h, int v) : Fl_Window (h, v) {};
                void resize(int x, int y, int w, int h) {Fl_Window::resize (x, 
y, w/2, h);};
        };

int main (int argc, char **argv)
        {
        MyWindow *fm;

        fm = new MyWindow (500, 300);
        fm->end ();
        fm->resizable (fm);
        fm->show ();

        Fl::run ();
        return (0);
        }

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

Reply via email to