Populate Gtk::TreeView?

Discussion in 'Ruby' started by Stephen Branley, Jul 14, 2006.

  1. Hi,

    I'm in need of a Gtk::TreeView in an application. I create the treeview
    and add it to my window (and the blank widget is indeed there) but I
    can't seem to add anything to the treeview. I create a treestore, get
    the iterator and use that to add data, but it doesn't seem to work, and
    the tree isn't updated. Where am I going wrong?

    Thanks

    --
    Posted via http://www.ruby-forum.com/.
    Stephen Branley, Jul 14, 2006
    #1
    1. Advertising

  2. Stephen Branley

    Kenosis Guest

    Stephen Branley wrote:
    > Hi,
    >
    > I'm in need of a Gtk::TreeView in an application. I create the treeview
    > and add it to my window (and the blank widget is indeed there) but I
    > can't seem to add anything to the treeview. I create a treestore, get
    > the iterator and use that to add data, but it doesn't seem to work, and
    > the tree isn't updated. Where am I going wrong?
    >
    > Thanks
    >
    > --
    > Posted via http://www.ruby-forum.com/.

    Posting the code could help us to help you.

    Ken
    Kenosis, Jul 14, 2006
    #2
    1. Advertising

  3. Am Samstag, den 15.07.2006, 04:57 +0900 schrieb Stephen Branley:
    > Hi,
    >
    > I'm in need of a Gtk::TreeView in an application. I create the treeview
    > and add it to my window (and the blank widget is indeed there) but I
    > can't seem to add anything to the treeview. I create a treestore, get
    > the iterator and use that to add data, but it doesn't seem to work, and
    > the tree isn't updated. Where am I going wrong?
    >

    Hi,

    there could different faults.

    First you have to attache renderers to the view-colums. Than you have to
    take care, that the renderer get notified when the model get changed.

    Take a look at the treeview-example at

    http://ruby-gnome2.sourceforge.jp/hiki.cgi?tut-treeview

    If you have further questions, please send the relevant parts of your
    code.

    Cheers
    detlef


    > Thanks
    >
    Detlef Reichl, Jul 15, 2006
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. manatlan
    Replies:
    0
    Views:
    431
    manatlan
    Apr 25, 2005
  2. Replies:
    2
    Views:
    517
  3. Enjoy Life
    Replies:
    2
    Views:
    272
    Roland Hall
    Feb 23, 2005
  4. Gergely Kontra
    Replies:
    2
    Views:
    249
    Joao Pedrosa
    Jun 18, 2004
  5. Alex Shulgin
    Replies:
    1
    Views:
    176
    thefed
    Nov 21, 2007
Loading...

Share This Page