[IGSTK-Developers] View does not show in Widget

Andinet Enquobahrie andinet.enqu at kitware.com
Thu Jan 31 14:58:41 EST 2008


Patrick,

This is not an issue in the view class.

You have to follow the correct sequence . You need to set the view 
inside the
widget before you invoke  the FLTK show() method.  That is the correct 
sequence.

Otherwise, if you follow a different function sequence, you will get a 
different
behavior. For example, if you call RequestSetView after
the show() method, then the FLTK window will render first before  the
View RenderWindow is connected with the FLTK window. Because of that,
you will see the View rendered separate from the FLTK window.

Sometimes even if you follow the correct sequence, the view might be 
rendered
outside the FLTK window due to OpenGL rendering timing issue. In those 
cases,
inserting artificial delay will help.

-Andinet



> Hi Andinet,
>
> I found there is an issue with the View class.
>
> Normally, in the testing code. We will call
>
> widget2D->RequestSetView( view2D );
>
> Before we finish creating the GUI.
>
> form->end();
> form->show();
>
> This works out pretty well.
>
>
> But if we move the RequestSetView call out of the GUI code, after 
> form->show. The render windows will not be contained in the widget.
>
> You can verify this by moving line 87 in
> igstkCoordinateReferenceSystemObjectWithViewTest
> Out of the GUI code.
>
> Thank you,
>
> Patrick
>
> _______________________________________________
> IGSTK-Developers mailing list
> IGSTK-Developers at public.kitware.com
> http://public.kitware.com/cgi-bin/mailman/listinfo/igstk-developers
>


-- 
==========================================================
Andinet A. Enquobahrie, PhD
R&D Engineer
Kitware Inc.

28 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-371-3971 x124
www.kitware.com





More information about the IGSTK-Developers mailing list