How many *lines* are visible in a GtkText?
- From: "Eric M. Monsler" <emonsler beamreachnetworks com>
- To: gtk-list gnome org
- Subject: How many *lines* are visible in a GtkText?
- Date: Thu, 15 Feb 2001 12:29:18 -0800
Hi all,
I posted this to gtk-app-devel-list a few days back, with no replies. I
thought that I'd try here. My apologies to those reading it twice.
I've got a window with a GtkText in it. I add text at the bottom,
discard it off the top, the operator can scroll up and down, as text is
added the visible part stays visible if pulled from the bottom, and
stays at the bottom as text is added once pulled to the bottom. So far,
all good.
Now, I want to sometimes add flush all the text out of the visible
portion of the GtkText, but leave it accessable by scrolling. The
easiest way I could think of to do this is to just add as many newlines
as are required to roll the old text off the top.
My problem is, I don't know how many lines are visible. The page_size
attribute of the adjustment is I believe in pixels? But how can I find
out how many pixels/line the default font is?
I use always the standard colors and font when adding test to the
GtkText.
Is there some way of directly finding out the number of lines?
TIA,
Eric M. Monsler
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]