Lazarević Ivica wrote:

> I tried the following code and the result is the same, it does not show the 
> inner window.


I'm not a FLTK 2 user, but I read from the docs that the inner window 
"must already be shown" for this to work.

> fltk::Window * inner;
> fltk::Window * outer;
> 
> void callback(fltk::Widget * w, void * data)
> {
>   inner->show_inside(outer);
>   cout<<"should show inner, but it does not"<<endl;
> }
> 
> int main()
> {
>   outer = new fltk::Window(500,500, "outer");
>   inner = new fltk::Window(200,200, "inner");
>   outer->begin();
>     fltk::Button *b = new fltk::Button(20,20,50,50, "button");
>     b->callback(callback);
>   outer->end();
>   outer->show();

     inner->show(); // <<<<< add this here <<<<<<

>   return fltk::run();
> }

Does this work? Maybe it would also work, if you add inner->show() just 
before inner->show_inside() in your callback.

Albrecht
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to