Peter Damoc wrote:
i have my mainfram, and in it a panel. pretty simple. but if i put item in the panel thay exceed the size of the window, the frame doesn't have scroll bars to allow me to view the extra content. what must i do to make a frame which scrolls?
use a ScrolledPanel.
see Demo->More Windows/Controls->ScrolledPanel code for more info.
Peter.
---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org
i just tried creating an instance of the class and i got the following errors, but i think i must be close
File "/usr/local/lib/python2.3/site-packages/wxPython/windows.py", line 541, in GetSizer
val = windowsc.wxWindow_GetSizer(self, *_args, **_kwargs)
TypeError: Type error in argument 1 of wxWindow_GetSizer. Expected _wxWindow_p.
here's my class
import wx.lib.scrolledpanel as wxScrolledPanel
class MyScrolledPanel(wxScrolledPanel.ScrolledPanel):
def __init__(self,parent,id):
self.SetupScrolling(self, scroll_y=True)
*snip*
mypanel = MyScrolledPanel(self,-1)
···
On Tue, 17 May 2005 15:11:59 +0300, Timothy Smith > <timothy@open-networks.net> wrote:
first
wx.lib.scrolledpanel.ScrolledPanel.SetupScrolling(self, scroll_y=True)
is equivalent to
self.SetupScrolling(scroll_y=True)
where self is an instance of wx.lib.scrolledpanel.ScrolledPanel
second...
most people call the __init__ of the parent first thing in their __init__ methods to ensure that the class is properly initialised
You're on the right track
Peter.
···
On Tue, 17 May 2005 15:53:15 +0300, Timothy Smith <timothy@open-networks.net> wrote:
i just tried creating an instance of the class and i got the following errors, but i think i must be close
File "/usr/local/lib/python2.3/site-packages/wxPython/windows.py", line 541, in GetSizer
val = windowsc.wxWindow_GetSizer(self, *_args, **_kwargs)
TypeError: Type error in argument 1 of wxWindow_GetSizer. Expected _wxWindow_p.
here's my class
import wx.lib.scrolledpanel as wxScrolledPanel
class MyScrolledPanel(wxScrolledPanel.ScrolledPanel):
def __init__(self,parent,id):
self.SetupScrolling(self, scroll_y=True)
*snip*
mypanel = MyScrolledPanel(self,-1)
Peter Damoc wrote:
i just tried creating an instance of the class and i got the following errors, but i think i must be close
File "/usr/local/lib/python2.3/site-packages/wxPython/windows.py", line 541, in GetSizer
val = windowsc.wxWindow_GetSizer(self, *_args, **_kwargs)
TypeError: Type error in argument 1 of wxWindow_GetSizer. Expected _wxWindow_p.
here's my class
import wx.lib.scrolledpanel as wxScrolledPanel
class MyScrolledPanel(wxScrolledPanel.ScrolledPanel):
def __init__(self,parent,id):
self.SetupScrolling(self, scroll_y=True)
*snip*
mypanel = MyScrolledPanel(self,-1)
first
wx.lib.scrolledpanel.ScrolledPanel.SetupScrolling(self, scroll_y=True)
is equivalent to
self.SetupScrolling(scroll_y=True)
where self is an instance of wx.lib.scrolledpanel.ScrolledPanel
second...
most people call the __init__ of the parent first thing in their __init__ methods to ensure that the class is properly initialised
i'm afraid i don't quite understand what you mean above with init the parent
···
On Tue, 17 May 2005 15:53:15 +0300, Timothy Smith > <timothy@open-networks.net> wrote:
You're on the right track
Peter.
---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org