Hi Greg, setting the font before calling fl_measure() didn't have the desired result. But I found a workaround: before adding the topmost Fl_Output I add a dummy Fl_Output with width = 0 and height = 0. And now the topmost widget is measured correctly. So my application works properly - but it would be interesting to know why...
Regards testalucida > On 02/01/12 09:44, testalucida wrote: > > Hi Ian, hi Albrecht, > > > > thanks for your proposals. > > I made the recommended improvements but without any effect. > > On debugging I found out that the measurement of the topmost Fl_Output > > widget (calling fl_measure()) sets > > "0" to my width variable (wi). > > > Try setting the font (with fl_font()) before calling fl_measure(), > because it uses the 'current font' to do the calculations. > > I believe in your draw() method, the first thing you call is > fl_measure() before any font has been set. > > _______________________________________________ fltk mailing list fltk@easysw.com http://lists.easysw.com/mailman/listinfo/fltk