Hi
I try to display different image on different box (image 1 on box1 and
image2 on box2 like sequence order)
By using fl_draw by calling redraw.
But redraw function display image on only one box. It is not display image
sequent
Herewith my piece of code for reference
class Select : public Fl_Box
{
protected:
void draw();
public:
Select(Fl_Boxtype b,int x, int y, int w, int h, const char *l) : Fl_Box(x,
y, w, h, l)
{
box(b);
color(FL_WHITE);
} *selbox[3];
};
void Select::draw()
{
fl_draw_image((const uchar*)&buff ,40, Ycord, 300, 30 , 3, 300*3);
}
int main(int argc, char *argv[])
{
window = new Fl_Window(600,800,"FLTK");
selbox[1] = new Select(FL_UP_BOX, 0, 100, 300, 30,"");
selbox[2] = new Select(FL_UP_BOX, 0, 150, 300, 30,"");
selbox[3] = new Select(FL_UP_BOX, 0, 200, 300, 30,"");
for(int i=1;i <=3 ; i++)
{
fd = open(name[i], O_RDONLY) ;
retval = read(fd, buff, sizeof(buff));
selbox[i]->redraw();
}
window->show();
return(Fl::run());
}
Regards
Pushparaj
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk