[EMAIL PROTECTED] writes:
 > Yeah, I see. So I will do it this way. But now I stumbled on the next
 > problem for me. For this to implement I need to switch from a GtkEntry 
 > to a GtkText. How can I generate a GtkText widget with exactly one
 > line? What I want to do, is to build a subclass of GtkText named
 > GtkRichEntry, with the same basic behaviour as GtkEntry. 
 > 
 > I can set the size with set_usize in pixels. So I looked for the size
 > of the current font. but font.height give me only 9 (9 what, really
 > pixels?) I saw in some examples the use of -1 as the second argument
 > so set_usize() what does it mean. 

  I didn't realize this was for a single-line entry.  Emulating an
entry with a text is probably more effort than it's worth.
  For font height, I used (font.ascent + font.descent).  I don't know
just what font.height() uses; the font I'm using (the default?) gives
the following:

        font.ascent = 11
        font.descent = 3
        font.height(string.letters) = 12

  My guess is that font.height() returns the height for the only for
the specific string you pass in, while the .ascent and .descent values 
represent the limits for all characters in the font.


  -Fred

--
Fred L. Drake, Jr. <[EMAIL PROTECTED]>
Corporation for National Research Initiatives
To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]

Reply via email to