On Thu, Jul 30, 2009 at 01:52, Julien Nadeau<[email protected]> wrote: > 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(). >
I like the automatic calculation but I just have problem using it because I just didn't know which widgets really alter the dimension of a container. I didn't want to use AG_WindowSetGeometry() because I had to calculate also the position and the height of the window when the only thing that I wanted was to make it wider. By the way, is it a function that can tell me the final dimension of a widget?, I try several things without success. I tried AG_WindowSetMinSize() before placing widgets inside the window and also after placing widgets and before calling AG_WindowShow() but it seems that the dimensions specified is ignored. >> 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 > Yeah, it's great. I find it after sending the mail :-) I'll send on another mail a proposal to enhance the Notebook widget related to the tab issue that I'm facing. Regards, Ernesto. _______________________________________________ Agar mailing list [email protected] http://libagar.org/lists.html
