Search code examples
pythonuser-interfaceuitableviewgtkpygtk

created sorted table in gtk


What's the easieest way to create a sorted table view in gtk? I'm not sure if that's the right term, but you know the one:

sorted table image
(source: sun.com)

Is there a built-in widget for this? If not, how would I go about making those columns that look slightly different, click to change sorting, etc. Note I don't need multi-column sorting at the moment.


Solution

  • Sorted List Stores

    UPDATE:

    After looking at your edit (disregarding commens):

    • There is no built-in widget, but ListView = TreeView + ListStore
    • Clicking to change sorting is harder, but probably not by much

    Remember that most anything is handled by their tutorial, at PyGTK.org (HTML) and in PDF Format. They also have a PyGTK Refrence, if that suits you better.