>
> 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:
> >=20
> > 80
> > 81   Fl_Box r(10,0,300-10,300-10);
> > 82   tile.resizable(r);
> > 83   // r.box(FL_BORDER_FRAME);
> > 84
> >=20
> > 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?
> >=20
> > This seems to violate two rules for Fl_Tile: tiles shouldn't overlap =
> and no more than one resizable in a tile group.
> >=20
> > 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.
>
>
>

Ian,

The behavior I would like is for each box in the tile to have some minimum size 
(say 3 pixels square). Currently, when I drag the border to one side or the 
other, one or more boxes completely disappears. If the user is unfamiliar with 
the layout, there is absolutely no visible cue that there is a hidden box 
lurking against one edge or corner of the drawn border. The poor user has to 
randomly try to drag borders until the hidden box appears.

Other widget toolkits have a splitter window that will show a double bar on one 
edge if there is a fully minimized window lurking there. I like the idea of 
Fl_Tile because it can handle the entire layout with one widget instead of 
having a bunch of nested two-way splitters.

My layout is:

+--------------------------+
|Menu                      |
+--------------------------+
|Toolbar                   |
+------+-------------------+
|      |                   |
|OpenGL|                   |
+------+                   |
|      |       OpenGL      |
|Dialog|                   |
|      |                   |
+------+-------------------+
| Fl_Table                 |
+--------------------------+

The dialog tile has buttons and editable text boxes. It needs scrollbars when 
its size is below a threshold. I'd like everything below the toolbar to be in 
an Fl_Tile.

Robert

_______________________________________________
fltk mailing list
fltk@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to