Hi all,
thank you for your efforts!
It works as you say, but I still can't understand why this doesn't work:
textfont( FL_HELVETICA_BOLD );
textsize( 12 );
(instead of fl_font(textfont(), textsize()); )
And why does it work when adding a dummy Fl_Output first?
bye
testalucida
On 02/02/12 06:28, MacArthur, Ian (SELEX GALILEO, UK) wrote:
> >> Other than that, built and ran OK for me.
> >
> > My code, or Martin's (testalucida's) original example?
>
> I started with your code.
> OP's wouldn't build; missing includes, std:: notation, etc.
>
> Also, I could see it was missing the fl_font() setting
> above fl_measure(), and uninitialized wi/he values.
>
> I just now took his code and modified it until it built,
> was able to replicate his problem, then added the two things
> we all discussed (adding fl_font() and wi/he=0) then it worked. ie:
>
> void draw() {
> int wi=0, he=0; // <-- CHANGED
> fl_font(textfont(), textsize()); // <-- ADDED
> fl_measure(this->value(), wi, he, 0);
> [..]
>
> ..so I'm pretty sure those are the things OP was missing.
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk