Hi all,

Apologies if this has been asked before; I've searched to
no avail.

After changing a window's label from a callback, how
can I make the change visible.  No combination
of redraw_label(), redraw(), damage() or Fl::flush()
does the job.  Nothing short of hide() followed by show()
seems to work.

TIA,
Stan

void cb(Fl_Widget*, void* v)
{
    Fl_Double_Window* w = static_cast<Fl_Double_Window*>(v);
    w->label("Changed it");
    /// what now?
    //  w->hide(); w->show();
}

int main()
{
    Fl_Double_Window win(300, 300, "A Window");
    Fl_Button* btn = new Fl_Button(100, 100, 100, 30, "Try It");
    win.end();
    btn->callback(cb, &win);
    win.show();
    return Fl::run();
}
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to