Re: Setting size of SpinButton
- From: Lars Clausen <lrclause cs uiuc edu>
- To: gtk-list gnome org
- Subject: Re: Setting size of SpinButton
- Date: 31 Jan 2001 11:58:06 -0600
On 31 Jan 2001, Havoc Pennington wrote:
>
> Lars Clausen <lrclause cs uiuc edu> writes:
>> I'm looking at a SpinButton that goes from -100.0 to 100.0, and the
>> Entry field turns out too small -- when you're at -10.0 or below, the
>> digits get cut off. From the spinbutton example in the tutorial, I just
>> see the gtk_widget_set_usize, which is not friendly to different fonts
>> etc. Is there a way I can say 'This spinbutton should be large enough
>> to accommodate "-100.0"'?
>>
>
> Not really, though we have a bug filed to implement that for 2.0. At
> the moment you would need to get gdk_string_width() for -100.0 using
> widget->style->font.
Thanks, that sounds like a reasonable solution. Curiously, I have to
multiply the width I get with 1.5 to get one that actually works.
-Lars
--
Lars Clausen (http://shasta.cs.uiuc.edu/~lrclause) | Hårdgrim of Numenor
"I do not agree with a word that you say, but I | Retainer of Sir Kegg
will defend to the death your right to say it." | of Westfield
--Evelyn Beatrice Hall paraphrasing Voltaire | Chaos Berserker of Khorne
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]