Hello,

How can I make an Fl_Tile automatically resize its and its children when the
Fl_Double_Window (its parent) resizes?

Inside the Fl_Tile, I have two other widgets stacked vertically. When the
apps appears, I can move the divider between the two widgets. However, when
I resize the app, the Fl_Tile doesn't grow.

I created a class Fl_MyTile : public Fl_Tile to capture the resize() call.
It appears that the Fl_Tile is growing, but its children are not growing
proportionately.

I have been trying something like the following but its not working:

class Fl_MyTile : public Fl_Tile
{
   public:
      Fl_MyTile(int X, int Y, int W, int H, const char *L = 0)
         : Fl_Tile(X, Y, W, H, L)
      {}

      void resize(int X, int Y, int W, int H)
      {
         printf("Fl_MyTile::resize:IN X=%d Y=%d W=%d H=%d\n", X,Y,W,H);

         // coords to the bottom of the bottom child widget
         int x1 = x();
         int y1 = y() + (h()-1);

         Fl_Tile::resize(X,Y,W,H);

         // Try to reposition the bottom child to the of
         // the Fl_Tile's dimensions
         Fl_Tile::position(x1, y1, X, Y + (H-1));

         printf("Fl_MyTile::resize:OUT x=%d y=%d w=%d h=%d\n",
            x(), y(), w(), h());
      }
};

What other trickery could I try?

Thanks.

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

Reply via email to