ScrolledPanel repaint problem with 2.8.7.1 on Linux

Daniel B. Koch kochdb at ornl.gov
Sun Dec 2 18:53:06 PST 2007


Hi folks,

This is a repost of a problem I first saw with 2.8.6.1 except that I've 
included some sample code this time. To recap:

1. Clicking on a wx.ScrolledPanel to set focus and using the mouse wheel 
to scroll causes the panel to repaint with a stutter - multiple images 
of child wx.Button widgets appear.

2. Dragging on the scrollbar itself works fine.

3. Clicking above and below the scrollbar works fine.

This is on a Fedora 7 system.

Thanks,
Dan

#! /usr/bin/env python

import wx
import wx.lib.scrolledpanel

class MyFrame(wx.Frame):

	def __init__(self):
		
		wx.Frame.__init__(self, None, title='My Frame', size=(640,480))
		
		panel = wx.lib.scrolledpanel.ScrolledPanel(self)
		sizer = wx.GridSizer(2, 2, 100, 100)
		
		for label in ['one', 'two', 'three', 'four', 'five', 'six', 'seven', 
'eight', 'nine', 'ten']:
			button = wx.Button(panel, -1, label)
			sizer.Add(button, 0, wx.ALIGN_CENTER | wx.ALL, 5)
		
		panel.SetSizer(sizer)
		panel.SetupScrolling(scroll_x=True, scroll_y=True, rate_x=20, rate_y=20)
		

if __name__ == '__main__':
	app = wx.PySimpleApp()
	frame = MyFrame()
	frame.Show()
	app.MainLoop()


-- 
Dr. Daniel B. Koch
Oak Ridge National Lab
http://www.ornl.gov/sci/gist/bios/bio_koch.html
(865) 241-9096




More information about the wxpython-users mailing list