wxPython Grid Question

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

    #1

    wxPython Grid Question

    Hey Peoples,
    I'm wonderg if there is a way to make a subclass of wx.grid.Grid in
    which the coloumn labels for the grid appear on the bottom of the grid
    instead of the top.

    1 2 3 4 5
    a| | | | | |
    b| | | | | |
    c| | | | | |
    d| | | | | |
    e| | | | | |

    Just in case that wasn't clear (and because I just feel like typing
    more): The above grid has labels in the normal placement. The grid
    below has the labels in the places I want them.

    a| | | | | |
    b| | | | | |
    c| | | | | |
    d| | | | | |
    e| | | | | |
    1 2 3 4 5

    Thanks

  • jean-michel bain-cornu

    #2
    Re: wxPython Grid Question

    Hi,
    Jordan a écrit :
    Hey Peoples,
    I'm wonderg if there is a way to make a subclass of wx.grid.Grid in
    which the coloumn labels for the grid appear on the bottom of the grid
    instead of the top.
    >
    1 2 3 4 5
    a| | | | | |
    b| | | | | |
    c| | | | | |
    d| | | | | |
    e| | | | | |
    >
    Just in case that wasn't clear (and because I just feel like typing
    more): The above grid has labels in the normal placement. The grid
    below has the labels in the places I want them.
    >
    a| | | | | |
    b| | | | | |
    c| | | | | |
    d| | | | | |
    e| | | | | |
    1 2 3 4 5
    >
    I don't know a regular way to do that, and may be it's not the right
    place to ask that, but what you'd do is to build two grids with the same
    layout, one at the top without the column label, and another below
    without data lines.
    It could work, but looks strange, and is probably a source of confusion
    for users.
    rgds,
    jm

    Comment

    • ajaksu

      #3
      Re: wxPython Grid Question

      Jordan wrote:
      Hey Peoples,
      I'm wonderg if there is a way to make a subclass of wx.grid.Grid in
      which the coloumn labels for the grid appear on the bottom of the grid
      instead of the top.
      Hi Jordan :)

      Not quite what you want, but I'm about to try faking labels in a grid.
      The reason is that I want more control regarding rendering the labels
      (using simple checkboxes and other features). So I'll try to get the
      first row to display as "headers". If that works, would it help you?
      And would you append rows frequently?

      Just FWIW, I recall reading that a grid is composed of some base
      elements (scrolled window and something else), so you might try to
      follow that lead. But jean-michel has two good points: it could be
      easier to use 2 grids and http://wxpython.org/maillist.php would give
      you better answers :)

      Cheers,
      Daniel

      Comment

      • jean-michel bain-cornu

        #4
        Re: wxPython Grid Question

        >I'm wonderg if there is a way to make a subclass of wx.grid.Grid in
        >which the coloumn labels for the grid appear on the bottom of the grid
        >instead of the top.
        >
        follow that lead. But jean-michel has two good points: it could be
        easier to use 2 grids and http://wxpython.org/maillist.php would give
        you better answers :)
        After a while, I think in the case where you'd want to use 2 grids, it
        could be tricky to reproduce scrollings and events across the two
        grids... and there are probably other inconvenients, particularly if you
        include it in sizers.
        Its probably not a so much good point.
        rgds
        jm

        Comment

        Working...