Re: How to set gtk_entry size?



Paul Davis <pbd op net> writes: 
> 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).
> 

SpinButton is_a GtkEntry rather than containing one, so it isn't
really supposed to be private. (Though the is_a relationship is a bit
questionable.)

Anyhow, spin buttons now default to basing their size request on MAX
(width_of_min_value, width_of_max_value), with a random hardcoded min
size of 30 pixels. You can override this with either
gtk_entry_set_width_chars() or gtk_widget_set_usize().

Havoc




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