Re: How many *lines* are visible in a GtkText?



GtkText has a member:

GList *line_start_cache;

which I believe is a list of all of the visible lines.  You could try
iterating through the list, counting how many lines it contains.  I
haven't tried, this, though.

Davina



Raymond Wan wrote:
> 
> > Date: Thu, 15 Feb 2001 12:29:18 -0800
> > From: "Eric M. Monsler" <emonsler beamreachnetworks com>
> > To: gtk-list gnome org
> > Subject: How many *lines* are visible in a GtkText?
> ...
> > Is there some way of directly finding out the number of lines?
> >
> > TIA,
> >
> > Eric M. Monsler
> 
> Hi Eric,
> 
>         This is actually a problem I have too but one that I'm not
> actively persuing -- probably in a few days after I get my other widgets
> working.  I, too, will have to find this out some day.  I haven't tried
> this, but would looking inside the GtkText structure help (as defined in
> gtk/gtktext.h)?  [I wouldn't know how to do this, though...]
> 
>         Actually, I was thinking of using variables and/or arrays to keep
> track of how much text I'm inserting as I insert them...a better solution
> would be nice!  If you get any e-mails about it, please forward to me...
> :)
> 
> Ray
> 
> _______________________________________________
> gtk-list mailing list
> gtk-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-list




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