Re: gtkctree



On 2001.12.09 14:07 Carlos Pereira wrote:

Thanks a lot, replacing the first by the second function below,
as suggested, definitely helps a lot, the whole bunch of 
10,000 objects are now visible.

gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW
(scrolled_window), ctree);
gtk_container_add (GTK_CONTAINER (scrolled_window), ctree);

A minor problem that appears when using gtk_container_add is that
the horizontal scrollbar in the scrolled window does not honour 
anymore the automatic policy as defined by the function below:

gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window),
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);

The horizontal scrollbar is always there, as if the policy
was GTK_POLICY_ALWAYS. The vertical scrollbar works ok.


The creation routine for the clist and ctree is very strict, and
the scroll bars are controlled greatly by the clist or ctree.

The proper way to have the horizontal scroll bar function properly
on a GtkCTree (not just a plain GtkCList) is to use:

gtk_ctree_set_line_style(ctree, GTK_CTREE_LINES_DOTTED);
gtk_clist_set_column_auto_resize(
        GTK_CLIST(ctree), 0, TRUE
);
gtk_clist_set_column_justification(
        GTK_CLIST(ctree), 0, GTK_JUSTIFY_LEFT
);

I'm assuming you only have one column in the GtkCTree btw.
If you have other regular columns in the ctree then it might
be a bit different but try the above anyways.


--
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]