Results 1 to 1 of 1

Thread: Need help with GtkTreeView

  1. #1
    Join Date
    May 2011
    Beans
    273

    Need help with GtkTreeView

    Hi everyone!

    I'm making a cinema program, which is showing movies names and the dates when they're playing.

    When I select a certain row in GtkTreeView everything works fine, I can get the value out of it, but what I want to do is to select a child row and then get the value of its parent too (when I select a date I also want to select movie name).

    How could I do this? Any ideas?

    This is the code for getting the value out of row that is selected:
    PHP Code:
    void row_act(GtkTreeView *treeviewGtkTreePath *treepathGtkTreeViewColumn *columnvoiddata)
    {
        
    GtkTreeSelection *selection;
        
    GtkTreeModel *model;
        
    GtkTreeIter iter;
        
    gchar *value;

        
    selection gtk_tree_view_get_selection(treeview);
        
    gtk_tree_selection_get_selected(selection, &model, &iter);
        
    gtk_tree_model_get(model, &iter0, &value, -1);
        
    g_print("Value: %s\n"value);
        
    g_free(value);

    Thanks in advance!
    Attached Images Attached Images
    Your left hand is touching your face.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •