Results 1 to 4 of 4

Thread: tree 如何取消选择

  1. #1
    Join Date
    Jun 2009
    Beans
    4

    Post tree 如何取消选择

    tree view,单击item,可以展开,并加亮显示。这是默认行为。

    现在,如果通过调用函数gtk_tree_selection_select_path选择另一个item ,如何使当前选中的item不再加亮显示?

    以下方法无效,不能取消原先选中item的加亮状态:

    GtkTreeSelection* sel = gtk_tree_view_get_selection( GTK_TREE_VIEW(dir_tree_view_widget) );
    gtk_tree_selection_unselect_path( sel, current_dir_tree_path );

    图解:

    root
    |
    |-item1
    |
    |-item2
    |
    ...

    选中item1,调用函数gtk_tree_selection_select_path选中item2, item1如何取消选中状态,不再加亮显示?

  2. #2
    Join Date
    May 2009
    Beans
    522

    Re: tree 如何取消选择

    you might want to post this in English...

  3. #3
    Join Date
    Aug 2007
    Beans
    949

    Re: tree 如何取消选择

    Yeah, this forum is English only. I forget where the Chinese forums are unfortunately, someone here should know though...

  4. #4
    Join Date
    Jun 2009
    Beans
    4

    Re: tree 如何取消选择

    thanks

Tags for this Thread

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
  •