wx.grid problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • BH

    #1

    wx.grid problem

    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.F rame):
    def __init__(self,p arent,id,title) :
    wx.Frame.__init __(self,parent, wx.ID_ANY,title )
    #--
    self.grid= wx.grid.Grid(id =wx.ID_ANY,pare nt=self)
    self.grid.Creat eGrid(numRows=1 0,numCols=2)
    self.grid.Fit()
    self.Fit()
    #--
    self.Show(1)
    #----------------------------------------------------------------------
    app = wx.PySimpleApp( )
    frame=MainWindo w(None,-1,'Grid sizer')
    app.MainLoop()
    del app
  • kyosohma@gmail.com

    #2
    Re: wx.grid problem

    On Mar 26, 10:20 am, BH <B...@bh.comwro te:
    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.F rame):
    def __init__(self,p arent,id,title) :
    wx.Frame.__init __(self,parent, wx.ID_ANY,title )
    #--
    self.grid= wx.grid.Grid(id =wx.ID_ANY,pare nt=self)
    self.grid.Creat eGrid(numRows=1 0,numCols=2)
    self.grid.Fit()
    self.Fit()
    #--
    self.Show(1)
    #----------------------------------------------------------------------
    app = wx.PySimpleApp( )
    frame=MainWindo w(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

    Comment

    • BH

      #3
      Re: wx.grid problem

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


      kyosohma@gmail. com a écrit :
      On Mar 26, 10:20 am, BH <B...@bh.comwro te:
      >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.F rame):
      > def __init__(self,p arent,id,title) :
      > wx.Frame.__init __(self,parent, wx.ID_ANY,title )
      > #--
      > self.grid= wx.grid.Grid(id =wx.ID_ANY,pare nt=self)
      > self.grid.Creat eGrid(numRows=1 0,numCols=2)
      > self.grid.Fit()
      > self.Fit()
      > #--
      > self.Show(1)
      >#----------------------------------------------------------------------
      >app = wx.PySimpleApp( )
      >frame=MainWind ow(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
      >

      Comment

      • kyosohma@gmail.com

        #4
        Re: wx.grid problem

        On Mar 26, 11:30 am, BH <B...@bh.comwro te:
        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.comwro te:
        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.F rame):
        def __init__(self,p arent,id,title) :
        wx.Frame.__init __(self,parent, wx.ID_ANY,title )
        #--
        self.grid= wx.grid.Grid(id =wx.ID_ANY,pare nt=self)
        self.grid.Creat eGrid(numRows=1 0,numCols=2)
        self.grid.Fit()
        self.Fit()
        #--
        self.Show(1)
        #----------------------------------------------------------------------
        app = wx.PySimpleApp( )
        frame=MainWindo w(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

        Comment

        • raboliot@gmail.com

          #5
          Re: wx.grid problem

          On 26 mar, 20:58, kyoso...@gmail. com wrote:
          On Mar 26, 11:30 am, BH <B...@bh.comwro te:
          >
          >
          >
          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.comwro te:
          >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.F rame):
          > def __init__(self,p arent,id,title) :
          > wx.Frame.__init __(self,parent, wx.ID_ANY,title )
          > #--
          > self.grid= wx.grid.Grid(id =wx.ID_ANY,pare nt=self)
          > self.grid.Creat eGrid(numRows=1 0,numCols=2)
          > self.grid.Fit()
          > self.Fit()
          > #--
          > self.Show(1)
          >#----------------------------------------------------------------------
          >app = wx.PySimpleApp( )
          >frame=MainWind ow(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

          Comment

          Working...