[erlang-questions] wxErlang question 3

Joe Armstrong <>
Sat Jul 8 10:50:35 CEST 2017


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


More information about the erlang-questions mailing list