ScrolledWindow doesn´t feature scroll with the mousewheel?

Hi! I´m making a really big program of mail sending. However my last problem
is the scrolling...
The scroll bar don´t react to the mouse wheel and only functions when
focusing in the bar , And that´s not user-friendly. how Can I achieve to
make the scroll bar react with the scroll wheel.

Here´s some relevant code:

···

class Man_at_files(wx.Frame):####dont pay attention to this bad Indent###

def __init__(self,parent):
   super(Man_at_files, self).__init__(None,pos =(10,50), style =
wx.MINIMIZE_BOX | wx.SYSTEM_MENU | >wx.CAPTION|wx.CLOSE_BOX)
   self.parent = parent
   self.FrameUI()
   self.SetTitle('Files added')
   self.SetSize((350,600))
   self.Show()

def FrameUI(self):
   bmp = wx.Bitmap("img/close.png", wx.BITMAP_TYPE_ANY)
   panel = wx.ScrolledWindow(self,-1,style = wx.VSCROLL)
   panel.SetScrollbars(0, 1, 0, 1)
   panel.SetScrollRate( 1, 1 )
   box = wx.BoxSizer(wx.VERTICAL)
   bmp3 = wx.Image('img/file_man.png',
wx.BITMAP_TYPE_ANY).ConvertToBitmap()
   #####buttons,text,whatever######

   panel.SetSizer(box)

--
View this message in context: http://wxpython-users.1045709.n5.nabble.com/ScrolledWindow-doesn-t-feature-scroll-with-the-mousewheel-tp5718309.html
Sent from the wxPython-users mailing list archive at Nabble.com.

Demarox wrote:

Hi! I�m making a really big program of mail sending. However my last problem
is the scrolling...
The scroll bar don�t react to the mouse wheel and only functions when
focusing in the bar , And that�s not user-friendly. how Can I achieve to
make the scroll bar react with the scroll wheel.

Platform and version? Do the wheel events work with the ScrolledWindow sample in the demo?

If on Windows then the system only sends wheel events to the ScrolledWindow if the window has the keyboard focus. It's stupid, but that's the way it is. The other platforms are nicer and will send the events to whatever is under the mouse cursor whether it has the focus or not.

···

--
Robin Dunn
Software Craftsman