469,313 Members | 2,578 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,313 developers. It's quick & easy.

wx.grid problem

BH
Hi !

I have a small problem with wx.Grid and scrollbars.
Scrollbars definitively dissapears after resizing the frame.

Thx for help

#----------------------------------------------------------------------
import wx,wx.grid
#----------------------------------------------------------------------
class MainWindow(wx.Frame):
def __init__(self,parent,id,title):
wx.Frame.__init__(self,parent,wx.ID_ANY,title)
#--
self.grid= wx.grid.Grid(id=wx.ID_ANY,parent=self)
self.grid.CreateGrid(numRows=10,numCols=2)
self.grid.Fit()
self.Fit()
#--
self.Show(1)
#----------------------------------------------------------------------
app = wx.PySimpleApp()
frame=MainWindow(None,-1,'Grid sizer')
app.MainLoop()
del app
Mar 26 '07 #1
4 2390
On Mar 26, 10:20 am, BH <B...@bh.comwrote:
Hi !

I have a small problem with wx.Grid and scrollbars.
Scrollbars definitively dissapears after resizing the frame.

Thx for help

#----------------------------------------------------------------------
import wx,wx.grid
#----------------------------------------------------------------------
class MainWindow(wx.Frame):
def __init__(self,parent,id,title):
wx.Frame.__init__(self,parent,wx.ID_ANY,title)
#--
self.grid= wx.grid.Grid(id=wx.ID_ANY,parent=self)
self.grid.CreateGrid(numRows=10,numCols=2)
self.grid.Fit()
self.Fit()
#--
self.Show(1)
#----------------------------------------------------------------------
app = wx.PySimpleApp()
frame=MainWindow(None,-1,'Grid sizer')
app.MainLoop()
del app
If I understand this correctly, that is normal. Your grid is only two
columns by 10 rows, so if you resize your frame so that it shows all
rows and columns, the scroll bars will disappear, much like other
apps, such as FireFox. If you enlarge the frame enough, the scrollbars
go away.

Mike

Mar 26 '07 #2
BH
Yes, absolutely, but try to minimize it, and the scrollbars stays hidden !!!
ky******@gmail.com a écrit :
On Mar 26, 10:20 am, BH <B...@bh.comwrote:
>Hi !

I have a small problem with wx.Grid and scrollbars.
Scrollbars definitively dissapears after resizing the frame.

Thx for help

#----------------------------------------------------------------------
import wx,wx.grid
#----------------------------------------------------------------------
class MainWindow(wx.Frame):
def __init__(self,parent,id,title):
wx.Frame.__init__(self,parent,wx.ID_ANY,title)
#--
self.grid= wx.grid.Grid(id=wx.ID_ANY,parent=self)
self.grid.CreateGrid(numRows=10,numCols=2)
self.grid.Fit()
self.Fit()
#--
self.Show(1)
#----------------------------------------------------------------------
app = wx.PySimpleApp()
frame=MainWindow(None,-1,'Grid sizer')
app.MainLoop()
del app

If I understand this correctly, that is normal. Your grid is only two
columns by 10 rows, so if you resize your frame so that it shows all
rows and columns, the scroll bars will disappear, much like other
apps, such as FireFox. If you enlarge the frame enough, the scrollbars
go away.

Mike
Mar 26 '07 #3
On Mar 26, 11:30 am, BH <B...@bh.comwrote:
Yes, absolutely, but try to minimize it, and the scrollbars stays hidden !!!

kyoso...@gmail.com a écrit :
On Mar 26, 10:20 am, BH <B...@bh.comwrote:
Hi !
I have a small problem with wx.Grid and scrollbars.
Scrollbars definitively dissapears after resizing the frame.
Thx for help
#----------------------------------------------------------------------
import wx,wx.grid
#----------------------------------------------------------------------
class MainWindow(wx.Frame):
def __init__(self,parent,id,title):
wx.Frame.__init__(self,parent,wx.ID_ANY,title)
#--
self.grid= wx.grid.Grid(id=wx.ID_ANY,parent=self)
self.grid.CreateGrid(numRows=10,numCols=2)
self.grid.Fit()
self.Fit()
#--
self.Show(1)
#----------------------------------------------------------------------
app = wx.PySimpleApp()
frame=MainWindow(None,-1,'Grid sizer')
app.MainLoop()
del app
If I understand this correctly, that is normal. Your grid is only two
columns by 10 rows, so if you resize your frame so that it shows all
rows and columns, the scroll bars will disappear, much like other
apps, such as FireFox. If you enlarge the frame enough, the scrollbars
go away.
Mike
The code you posted works for me. I am using Windows XP Pro, Python
2.4, wxPython 2.8. When I enlarge it, the scrollbars go away and when
I shrink it down, the scrollbars reappear. I tried using sizers, but
that seemed to cause problems.

I highly recommend that you post your questions about wxPython to the
wxPython users group. They have many talented and knowledgeable people
there. See http://wxpython.org/maillist.php

Mike

Mar 26 '07 #4
On 26 mar, 20:58, kyoso...@gmail.com wrote:
On Mar 26, 11:30 am, BH <B...@bh.comwrote:
Yes, absolutely, but try to minimize it, and the scrollbars stays hidden !!!
kyoso...@gmail.com a écrit :
On Mar 26, 10:20 am, BH <B...@bh.comwrote:
>Hi !
>I have a small problem with wx.Grid and scrollbars.
>Scrollbars definitively dissapears after resizing the frame.
>Thx for help
>#----------------------------------------------------------------------
>import wx,wx.grid
>#----------------------------------------------------------------------
>class MainWindow(wx.Frame):
> def __init__(self,parent,id,title):
> wx.Frame.__init__(self,parent,wx.ID_ANY,title)
> #--
> self.grid= wx.grid.Grid(id=wx.ID_ANY,parent=self)
> self.grid.CreateGrid(numRows=10,numCols=2)
> self.grid.Fit()
> self.Fit()
> #--
> self.Show(1)
>#----------------------------------------------------------------------
>app = wx.PySimpleApp()
>frame=MainWindow(None,-1,'Grid sizer')
>app.MainLoop()
>del app
If I understand this correctly, that is normal. Your grid is only two
columns by 10 rows, so if you resize your frame so that it shows all
rows and columns, the scroll bars will disappear, much like other
apps, such as FireFox. If you enlarge the frame enough, the scrollbars
go away.
Mike

The code you posted works for me. I am using Windows XP Pro, Python
2.4, wxPython 2.8. When I enlarge it, the scrollbars go away and when
I shrink it down, the scrollbars reappear. I tried using sizers, but
that seemed to cause problems.

I highly recommend that you post your questions about wxPython to the
wxPython users group. They have many talented and knowledgeable people
there. Seehttp://wxpython.org/maillist.php

Mike
OK, Thx I will have a look.
FYI The scrollbars definitively dissapears under Linux too ! (for me)

Best regards,

Bertrand

Mar 26 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by dimitri pater | last post: by
6 posts views Thread by Richard Lewis | last post: by
2 posts views Thread by Jordan O'Hare | last post: by
10 posts views Thread by John Wilson | last post: by
117 posts views Thread by phil-news-nospam | last post: by
reply views Thread by BH | last post: by
2 posts views Thread by skanemupp | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by harlem98 | last post: by
1 post views Thread by Geralt96 | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.