On Thu, Jul 30, 2009 at 12:13:24AM -0300, Ernesto Domato wrote:
> On Wed, Jul 29, 2009 at 21:30, Julien Nadeau<[email protected]> wrote:
> >
> > As a work-around for now, you can use multi-line labels, or set a
> > different font size in the tab labels with AG_NotebookSetTabFont().
> 
> Well, for now is a good work-around. Another one that I'm using is to
> add a long label with all spaces as the last widget of the AG_Box
> because this is the only one that resize the AG_Box container enough
> to see both tabs. I guess that if I use a transparent PNG line of one
> pixel on a AG_Fixed widget and then I resize it to be wider it should
> work too but for now it was more easy with the label trick ;-)

You don't have to stick to the auto-calculated sizing if it's not
satisfactory. Why not simply increase the size of your window (e.g.,
using AG_WindowSetGeometry() or one of its variants)? You can also
force a minimum size larger than the default with AG_WindowSetMinSize().

> The only problem that I'd have to solve is the calculation of the
> string size of the tabs together so I can calculate the amount of
> spaces needed to add to the label because TTF has different width size
> for each character, but is not really that complicate and would be
> better for different size labels due to internationalization.

AG_TextSize() can do this for you, see:
http://libagar.org/man3/AG_TextSize

> > It is best to avoid explicit widget dimensions in pixels in your
> > application if you can. The final widget dimensions are determined by
> > whichever container widget your widget is using (i.e., AG_Box(3) tries
> > to accomodate widget-requested sizes, AG_Fixed(3) sets explicit sizes
> > and positions in pixels). The container widget returned by
> > AG_NotebookAddTab() is essentially an AG_Box.
> 
> Yeah, I know this and for that reason the work-arounds are the best
> solution at this moment really because of the internationalization
> problem that makes different size of labels used by the widgets for
> example.
> 
> Regards,
> Ernesto

_______________________________________________
Agar mailing list
[email protected]
http://libagar.org/lists.html

Reply via email to