refresh wxpanel

Hi

I tried a simple app with a frame containing a panel containingf a wxEditor control

(by the way I could not import the wxEditor with the new "import wx" style
so I used the traditionnal "from wxPython.lib.editor import wxEditor")

so if in init of the frame I put the editor control onto the panel, it works as expected

but if I add it after a click on a menu entry, the control shows only after I resize the widow with the mouse

here is the OnMenuEntry Hook
   def OnMenuEntry(self,event):
    win = self.panel (wxpanel defined in the frame init)
    
    ed = wxEditor(win, -1, style=wx.SUNKEN_BORDER)
    
    box = wx.BoxSizer(wx.VERTICAL)
    box.Add(ed, 1, wx.ALL|wx.GROW, 1)
    win.SetSizer(box)
    win.SetAutoLayout(True)

so what is the command to refresh the panel ?
I tried win.show(), win.refresh() etc...
but it does not work

thanks

pascal

pascal barbedor wrote:

but if I add it after a click on a menu entry, the

> control shows only after I resize the widow with the mouse

[...]
so what is the command to refresh the panel ? I tried win.show(), win.refresh() etc...
but it does not work

Almost all of the method-names in wxPython/wxWindows are FirstLetterCaps -- try win.Refresh(). However, you may need to force the adjustment of sizes of various components first -- you should be able to do that with win.Layout() just before win.Refresh().

Jeff Shannon
Technician/Programmer
Credit International