Marc R.J. Brevoort wrote:
> If I try to set a label like so, the label contents look garbled:
>
> // i is an integer from 1 to 24
> char labeltext[3];
> snprintf(&labeltext[0],3,"%d",i);
> this->tracknum->label(labeltext);
Sounds like your char array is going out of scope
before you enter the FLTK app loop.
Either make sure your char declaration doesn't go out of scope,
or try instead:
this->tracknum->copy_label(labeltext);
..which will ensure fltk makes its own copy of your string,
so that if the string goes out of scope, it won't affect FLTK's copy.
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk