I’m a new wxPython user and I found immediatly some problems. My only know of direct GUI programming from source code came from Java world…
What I wanna obtain is a window with some subelements (and this is simple). One of those subelement is a Panel, with other element inside (for now a Grid). The grid can contains many and many rows, So I need that the Panel outside to be scrollable.
But I find some problems to get his to work. Playing with Panel style I can make the scrollbar to appear, but nothing more (using the scrollbar do nothing at all!!!).
There’s a simple example to follow, or some indication that I can use? I tryed the wx.lib.scrolledpanel.ScrolledPanel, but nothing changed…
I'm a new wxPython user and I found immediatly some problems. My only know of direct GUI programming from source code came from Java world...
What I wanna obtain is a window with some subelements (and this is simple). One of those subelement is a Panel, with other element inside (for now a Grid). The grid can contains many and many rows, So I need that the Panel outside to be scrollable.
But I find some problems to get his to work. Playing with Panel style I can make the scrollbar to appear, but nothing more (using the scrollbar do nothing at all!!!).
There's a simple example to follow, or some indication that I can use? I tryed the wx.lib.scrolledpanel.ScrolledPanel, but nothing changed...
Thanks all!
You should not need to do anything special at all, wxPython handles scrolling for you in the majority of cases. I have attached a very simple example of a grid in a frame with another control, that scrolls just fine with no special code. I used a sizer to allow for the other control but it still works if you just put the grid as the only child of the frame.
Perhaps you are using sizers but not giving it a proportion or telling it to expand (depending on which is appropriate), or you are not using sizers and not making it the only child?
I’m a new wxPython user and I found immediatly some problems. My only
know of direct GUI programming from source code came from Java world…
What I wanna obtain is a window with some subelements (and this is
simple). One of those subelement is a Panel, with other element inside
(for now a Grid). The grid can contains many and many rows, So I need
that the Panel outside to be scrollable.
But I find some problems to get his to work. Playing with Panel style
I can make the scrollbar to appear, but nothing more (using the
scrollbar do nothing at all!!!).
There’s a simple example to follow, or some indication that I can use?
I tryed the wx.lib.scrolledpanel.ScrolledPanel, but nothing changed…
Thanks all!
You should not need to do anything special at all, wxPython handles
scrolling for you in the majority of cases. I have attached a very
simple example of a grid in a frame with another control, that scrolls
just fine with no special code. I used a sizer to allow for the other
control but it still works if you just put the grid as the only child of
the frame.
Perhaps you are using sizers but not giving it a proportion or telling
it to expand (depending on which is appropriate), or you are not using
sizers and not making it the only child?
Hopefully this helps,
Mike
import wx, wx.grid
class MyFrame(wx.Frame):
def init(self):
wx.Frame.init(self, None, title=“Grid example”)
I found a little difficult to find good documentation on wxPython on the web... The starting tutorial is a good point to start, but after that...
The demo is always a got starting point (download it from here Redirecting... if you don't have it yet), then the wiki here http://wiki.wxpython.org/, then the new wxPython API doc (not complete but still very useful - NameBright - Coming Soon , also available as a download, then the wxWidgets docs which comes with the demo and last but not least this list is always very helpful.
Then there is also The Book (wxPython in Action) and am sure there are some more places.