Re: How to select a GtkCTree branch?
- From: learfox furry ao net
- To: Michael Hussmann <m hussmann home ins de>
- Cc: GTK Application Development List <gtk-app-devel-list gnome org>
- Subject: Re: How to select a GtkCTree branch?
- Date: Wed, 27 Dec 2000 01:12:37 -0800 (PST)
Maybe you want something like this:
if (gtk_ctree_node_is_visible(GTK_CTREE(tree), tnode)
!= GTK_VISIBILITY_FULL)
{
GtkCTreeNode *pnode;
pnode = GTK_CTREE_ROW(tnode)->parent;
while (pnode != NULL)
{
gtk_ctree_expand(GTK_CTREE(tree), pnode);
pnode = GTK_CTREE_ROW(pnode)->parent;
}
}
gtk_ctree_node_moveto(GTK_CTREE(tree), tnode, 0, 0, 0);
gtk_ctree_select(GTK_CTREE(tree), tnode);
This worked out great, thanks a bunch! :)
I changed the code a bit to get the row data of the given node's parent to
see if the parent was expanded or not instead of using
gtk_ctree_node_is_visible().
Ie:
pnode = GTK_CTREE_ROW(tnode)->parent;
if((pnode == NULL) ? 0 : !(GTK_CTREE_ROW(pnode)->expanded))
{
...
}
--
Sincerely, ,"-_ \|/
-Capt. Taura M. , O=__ --X--
..__ ,_JNMNNEO=_ /|\
OMNOUMmnne. {OMMNNNEEEEOO=_
UOOOBIOOOEOMMn. 'LONMMMMNNEEEOOO=.__..,,..
UUOOEUUOOOOOOOObe '"=OMMMMWNEEEOOOOO,"=OEEEOO=,._
OOUUUIEEIOONNOIUbe. "7OMMMMNNNNNWWEEEEOOOOOO" "'.
EEBNNMMMNWNWWEEIMMNe. __ 7EMMMNNNNNWWWEEEEEEEOO. " .
NNMMMMWWWMMMWEINMMMNn "=BBEEEEMMMMMMMMNNNWWWEEOOOOO=._ .
http://furry.ao.net/~learfox/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]