Re: TextView font dimensions
- From: Torsten Schoenfeld <kaffeetisch gmx de>
 
- To: gtk-perl-list gnome org
 
- Subject: Re: TextView font dimensions
 
- Date: Tue, 22 Jun 2004 17:10:30 +0200
 
On Tue, 2004-06-22 at 14:51, Thomas Christensen wrote:
1. Calculate the rows and columns of a TextView with a monospaced font.
I never did anything like that, but I suppose you'd use
  pango_font_get_glyph_extents or 
  pango_font_get_metrics
and use that data to calculate what you need.  Another possibility might
be
  gtk_text_view_get_line_yrange.
I think you just need to play around a bit and/or look at how other
programs do it.
2. Make the window manager display these dimensions when resizing the
application.
This can be done with
  gtk_window_set_geometry_hints and/or
  gdk_window_set_geometry_hints.
HTH,
-Torsten
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]