I have a question for the best way to deal with a problem, or perhaps whether the problem I'm finding is a bug.
I've been trying to make my wxpython app be cross-platform, and The Flicker Problem with Windows is considerable. The advice on solving it seems to indicate that one should do the following:
My app draws to the whole window (it's a graphical application) so that's actually no problem for me.
Except for one place: the corner between the horizontal and vertical scrollbars.
It's not part of the Client Area, so I'm never drawing to it. But if I change the size of my virtual area, so that before I have one scrollbar and afterwards I have two scrollbars, then I can get a chopped off part of a scrollbar leftover in the corner. My app zooms in and out of an image, so I do change the virtual area.
My question: Is there a best practice to avoid this situation when you're not auto-erasing the background? I see it in macOS (see images below) and also in Windows.
# attempting to avoid Windows flicker # THIS IS WHAT CAUSES THE SCROLLBAR ARTIFACT # if this line is absent, scrollbar corner is erased fine self.SetBackgroundStyle(wx.BG_STYLE_PAINT)
# x smaller than MainWindow, y larger than MainWindow self.SetVirtualSize(600,1000) self.SetScrollRate(10,10)
# scroll so vert. scrollbar is at bottom self.Scroll(0,2000)
wx.CallLater( 1000, self.zoom_scroll, ) def zoom_scroll(self): # x larger than MainWindow, y larger than MainWindow self.SetVirtualSize(1000,1200) # scroll so vert. scrollbar is at bottom self.Scroll(0,2000)
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.