Re: How to set gtk_entry size?



>There are no issues with non-Latin1 text. set_width_chars() uses the
>'average char width' from the Pango font, which is somewhat a voodoo
>number, but does consider the existence of non-Latin1. After all
>that's the point of Pango.
>
>set_width_chars() is intended for when you don't know exactly which
>chars it will contain - if you know the entry will contain "lllllll"
>then setting the usize is probably right, but also, using a label
>rather than an entry is probably right. ;-)

ah, what i failed to notice was that the prefix is "gtk_entry" rather
than "gtk_widget". in fact, i failed to notice it so much that i even
used the same prefix when referring to the function i posted (which is
actually prefixed gtk_widget_...). that helps to explain the approach
you've taken. 

is this going to work for spinbuttons as well? my recollection is that
the GtkEntry widget is supposed to be "private", and thus not amenable
to tricks to set its width. or do we just violate the privacy rule and
set it anyway, since trying it on the overall widget fails miserably
due to the (unknowable) width of the controls (typically arrows).

--p





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