[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: autoresize of ctree? [SOLVED]



On Sun, Feb 06, 2000 at 02:27:05PM +0100, lists@nuts.netplace.de wrote:

Hi, I found the problem...reading and tracing the gtk-source really helps
a lot 8)

> 
> got here a little problem with my directory-browser (implemented as ctree)
> (Gtk 1.2.6)
> 
> Works fine, but when the user descends so far in the directory hierachy,
> that the tree is getting wider as the screen, there wont be a
> horizontal scrollbar displayed.
> 
> I tried several things and the only a call like:
> 
>         gtk_clist_set_column_auto_resize(GTK_CLIST(ctree),0,TRUE); 
> 	(this seems to be missing for ctrees)

This is really valid to do - and also the key!

> 
> has the desired effect - but this produces a lot of 
> 
> Gdk-CRITICAL **: file gdkfont.c: line 304 (gdk_string_width): assertion `string != NULL' failed.
> 
> errors...

The problem was, that I added empty nodes to the tree (which were replaced
dynamically when the user expands a node..). This nodes had NULL as text-string.
Setting this to any string does fix the warnings and everything is fine!

Thanks,

Thomas

-- 
  ___ ___
 /   |   \  ___________   | REAL   : Thomas Niederreiter: Munich, Germany
/    ~    \/  _ \_  __ \  | EMAIL  : tn@rz.fh-muenchen.de
\    Y    (  <_> )  | \/  | WEB    : www.xcdroast.org
 \___|_  / \____/|__|     |
       \/ All I want is a warm bed and a kind word and unlimited power
                      -- Ashleigh Brilliant



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]