[wxPython] Scrolling a Scrollbar with keystroke

Hello,

the following code is tested and works:

import wx
import wx.lib.scrolledpanel as scrolled

class MyProgram(scrolled.ScrolledPanel):
     def __init__(self, parent):
         self.Scrollpanel = scrolled.ScrolledPanel(parent, -1)

         self.Scrollpanel.SetScrollbars(1, 1, 0, 500)

         self.Scrollpanel.Bind(wx.EVT_CHAR, self.LogKeyEvent)

     def LogKeyEvent(self, evt):
         self.Scrollpanel.Scroll(0, 100)

app = wx.PySimpleApp()

frame = wx.Frame(None, -1, "Test")

MyProgram(frame)
frame.Show(True)

app.MainLoop()

The program initiates a panel with a scrollbar at the right. By pressing a key the scrollbar is scrolled.

I would like to know why it is the case, that only the first pressed key triggers the scroll-action and how to solve this problem that every keystroke leads to the scroll-event.

Regards,
Franz Hoehne