Hi,
I am trying to show scroll bars using the last and most automatic method listed in the API (by using sizers). For some reason I cant get the scroll bars to show up. Am I missing something:
class readerPlotPanel(wxScrolledWindow):
lineHistory = []
readerList = []
numReaders = 4
def __init__(self, parent):
wxScrolledWindow.__init__(self,parent, -1, wxPoint(0,0),size=(50,50),style= wxSUNKEN_BORDER)
sizer = wxBoxSizer(wxVERTICAL)
self.SetSizer(sizer)
sizer.Add(wxButton(self,-1,"One"),0,wxALL,0)
sizer.Add(wxButton(self,-1,"Two"),1,wxALL,3)
self.SetScrollRate(1, 1)
class myFrame(wxFrame):
def __init__(self):
wxFrame.__init__(self,NULL,-1,"")
panel = readerPlotPanel(self)
class myApp(wxApp):
def OnInit(self):
menu = myFrame()
menu.Show(1)
return(true)
ma = myApp(0)
ma.MainLoop()
Derrick
November 14, 2003, 5:09pm
2
Gilad Suberri wrote:
Hi,
I am trying to show scroll bars using the last and most automatic method listed in the API (by using sizers). For some reason I cant get the scroll bars to show up. Am I missing something:
class readerPlotPanel(wxScrolledWindow):
lineHistory =
readerList =
numReaders = 4
def __init__(self, parent):
wxScrolledWindow.__init__(self,parent, -1, wxPoint(0,0),size=(50,50),style= wxSUNKEN_BORDER)
sizer = wxBoxSizer(wxVERTICAL)
self.SetSizer(sizer)
sizer.Add(wxButton(self,-1,"One"),0,wxALL,0)
sizer.Add(wxButton(self,-1,"Two"),1,wxALL,3)
self.SetScrollRate(1, 1)
Hi,
self.SetScrollbars(80, 20, 10, 10)
self.SetScrollRate(1, 1)
dlim
···
class myFrame(wxFrame):
def __init__(self):
wxFrame.__init__(self,NULL,-1,"")
panel = readerPlotPanel(self)
class myApp(wxApp):
def OnInit(self):
menu = myFrame()
menu.Show(1)
return(true)
ma = myApp(0)
ma.MainLoop()
Thanks, that worked. I had figured that out before but the API description
makes it seem that you do not need to call SetScrollbar anymore.
Gilad
···
----- Original Message -----
From: "Derrick" <dlim@gf.org>
To: <wxPython-users@lists.wxwindows.org>
Sent: Friday, November 14, 2003 12:09 PM
Subject: Re: [wxPython-users] wxScrollWindow
Gilad Suberri wrote:
>Hi,
>I am trying to show scroll bars using the last and most automatic method
listed in the API (by using sizers). For some reason I cant get the scroll
bars to show up. Am I missing something:
>
>class readerPlotPanel(wxScrolledWindow):
> lineHistory =
> readerList =
> numReaders = 4
>
> def __init__(self, parent):
> wxScrolledWindow.__init__(self,parent, -1,
wxPoint(0,0),size=(50,50),style= wxSUNKEN_BORDER)
> sizer = wxBoxSizer(wxVERTICAL)
> self.SetSizer(sizer)
> sizer.Add(wxButton(self,-1,"One"),0,wxALL,0)
> sizer.Add(wxButton(self,-1,"Two"),1,wxALL,3)
> self.SetScrollRate(1, 1)
>
>
Hi,
self.SetScrollbars(80, 20, 10, 10)
self.SetScrollRate(1, 1)
dlim
>
>
>class myFrame(wxFrame):
>
>
> def __init__(self):
> wxFrame.__init__(self,NULL,-1,"")
> panel = readerPlotPanel(self)
>
>
>
>
>
>class myApp(wxApp):
>
> def OnInit(self):
> menu = myFrame()
> menu.Show(1)
> return(true)
>
>
>ma = myApp(0)
>ma.MainLoop()
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwindows.org
For additional commands, e-mail: wxPython-users-help@lists.wxwindows.org