On 6 Dec 2011, at 21:48, Robert Strickland wrote:

> I am new to FLTK. I am using fltk 1.3.0. For my application, I would like to 
> establish some minimum sizes for individual tiles that make up the Fl_Tile. 
> The supplied test/tile.cxx seems to have some of the behavior I want. Box 2a 
> seems to have a minimum width, and box 3b seems to have a minimum height. 
> This seems to be due to lines 81-82:
> 
> 80
> 81   Fl_Box r(10,0,300-10,300-10);
> 82   tile.resizable(r);
> 83   // r.box(FL_BORDER_FRAME);
> 84
> 
> These would appear to create an invisible box that overlaps other Fl_Boxes 
> that make up the tile. If I comment out these lines, boxes 2a and 3b can 
> shrink until they disappear. How does this code achieve the minimum sizes?
> 
> This seems to violate two rules for Fl_Tile: tiles shouldn't overlap and no 
> more than one resizable in a tile group.
> 
> How can I use this same technique to make the other tiles have minimum sizes 
> as well?

What are you actually hoping to achieve, and how sure are you that Fl_Tile is 
the container you want?

I've seen a few examples recently where people had tied themselves in knots 
doing complicated things with Fl_Tile, when it turned out that what they needed 
was just to use a few suitably nested Fl_Groups, and take advantage of fltk 
standard resize behaviours...

So, I'm not saying that Fl_Tile is not the container you want, it may well be, 
and you know more about your application than anyone else can. But, you know, 
maybe it is the wrong thing for the job...

Can you describe where you are trying to get to, maybe someone here will be 
able to chip in with good ideas on how to get there from here.

In any case, as a first stab, nesting Fl_Groups inside the Fl_Tile can give you 
some control over the resize behaviour of groups of widgets that may alter the 
effects you are seeing in beneficial ways.



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

Reply via email to