wx.grid problem
BH
BH at bh.com
Mon Mar 26 12:30:18 EDT 2007
Yes, absolutely, but try to minimize it, and the scrollbars stays hidden !!!
kyosohma at gmail.com a écrit :
> On Mar 26, 10:20 am, BH <B... at bh.com> wrote:
>> 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
>
More information about the Python-list
mailing list