huda wrote:
> How can i put image on the button widget??
In the following, change /var/tmp/foo.jpg to where your
image lives.
#include <FL/Fl.H>
#include <FL/Fl_Window.H>
#include <FL/Fl_Shared_Image.H>
#include <FL/Fl_JPEG_Image.H>
#include <FL/Fl_Button.H>
int main() {
fl_register_images(); // initialize image lib
Fl_Window win(720,486); // make a window
Fl_Button but(10,10,720-20,486-20); // widget that will contain
image
Fl_JPEG_Image jpg("/var/tmp/foo.jpg"); // load jpeg image into ram
but.image(jpg); // attach jpg image to box
win.show();
return(Fl::run());
}
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk