Potential bug ?

Xaviou <[email protected]> Thu, 23 Aug 2018 23:43:32 -0700 (PDT)
Newsgroups gmane.comp.python.wxpython.devel
Message-ID <[email protected]>
Hi

I've just noticed a strage behavior while creating a simple frame with a 
notebook on it.

If the notebook has more than one page, and its creation code is the last 
one (nothing created after it), a small 20x20 black square appears on the 
first page.
If I switch to another page and come back to the first one, the square 
disappears.
If the notebook has only one page, the square doesn't appears.

This does not happen if something (for example a status bar) is created 
after the notebook.

Here is a screenshot of the problem (tested only on Windows 10 with the 
last wxPython dev snapshot) :

[image: wxPython-TestFrame.png] <about:invalid#zClosurez>

And here is the code to reproduce this :


class MainFrame(wx.Frame):

    def __init__(self):
        wx.Frame.__init__(self, parent=None, title='wxPython Test App')

        self.CreateStatusBar()
        self.SetStatusText("wxPython " + wx.version())

        book = wx.Notebook(self)
        for i in range(2):
            panel = wx.Panel(book)
            book.InsertPage(i, panel, "Page #" + str(i+1))

class MyApp(wx.App):
    def OnInit(self):
        frm = MainFrame()
        self.SetTopWindow(frm)

        frm.Show()
        return True

app = MyApp()
app.MainLoop


If the 2 statusbar lines are placed at the end of the __init__ method, the 
problem disappears.
I have also tested using a sizer but this doesn't change anything.

Regards
Xav'

-- 
You received this message because you are subscribed to the Google Groups "wxPython-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.
wxPython-TestFrame.png (image/png, 4.2 KB) - not displayed