wx.grid problem

B

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
 
K

kyosohma

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
 
B

BH

Yes, absolutely, but try to minimize it, and the scrollbars stays hidden !!!


(e-mail address removed) a écrit :
 
K

kyosohma

Yes, absolutely, but try to minimize it, and the scrollbars stays hidden !!!

(e-mail address removed) a écrit :

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
 
R

raboliot

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,262
Messages
2,571,049
Members
48,769
Latest member
Clifft

Latest Threads

Top