wxErlang question 3

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

wxErlang question 3

Joe Armstrong-2
More questions:

seems like wxFrame:show(Frame) must come last

This worked:

     a() ->
          Wx     = wx:new(),
          Frame  = wxFrame:new(Wx, -1, "Button"),
          ... add some stuff to the frame ...
         wxFrame:show(Frame),
         loop(Frame)

This failed

     b()() ->
          Wx     = wx:new(),
          Frame  = wxFrame:new(Wx, -1, "Button"),
          wxFrame:show(Frame)
             ... add some stuff to the frame ..
         loop(Frame).

In b the stuff added to the frame is not displayed correctly - but if
I resize the
window the display *is* correct.

Questions:

    1) Do I have to call wxFrame:show(Frame) *after* all controls have
been added?

    2) Is there come call I can make at the point just before I call
loop/1 in b()
       which updates the window correctly?

Cheers

/Joe
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions