FLTK logo

Re: [fltk.general] Label not visible in Fl_Button

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.general  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Re: Label not visible in Fl_Button matthiasm Jul 12, 2007  
 
On Jul 13, 2007, at 5:26 AM, Suja wrote:

> Fl_Button *o;
> o->label("reference image");
> displays reference image as label, But.
>
> char reflabel[10] = "reference image";
> o->label(reflabel);
> doesn't show any label on the button..

You seem to have declared "reflabel" as a local variable, so as soon  
as you leave the function, "reflabel" will vanish and Fl_Button will  
show whatever junk it finds where "reflabel" once was. Just use  
"copy_label()" instead of "label()" and you are done.

----
http://robowerk.com/
Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.