comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Font compatibility question
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Font compatibility question [message #61421] Thu, 17 July 2008 10:02 Go to next message
pdoherty is currently offline  pdoherty
Messages: 8
Registered: April 2007
Junior Member
On Jul 17, 12:24 pm, David Fanning <n...@dfanning.com> wrote:
> pdoherty writes:
>> Any information would be appreciated. I'd rather not have to go
>> through this
>> whole package and add a lot of OS based case statements.
>
> My advice would be to use column and base widgets for program
> layout and don't explicitly size *anything*. But maybe it's
> too late for this excellent advice. :-(
>
> Cheers,
>
> David
> --

Thank yo fo rthe advice, but I find that *some* things need to
be sized or the program gets too ugly.

I want a base that holds a stack of widget_buttons, so I create
a column oriented base and fill it with buttons. I want all
the buttons to be the same width, so I set it. Otherwise they
are all sized by the system based on the text that labels them.
It doesn't get much uglier than that. Is there some other way
to force them to be the same? I suppose I could create bitmaps
that were the same size and held the label text, but that is
ugly programming.

I tried to avoid explicit sizing of items when I wrote this,
but found many circumstances in which that led to a very ugly
layout.

- Peter Doherty
Re: Font compatibility question [message #61425 is a reply to message #61421] Thu, 17 July 2008 09:24 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
pdoherty writes:

> Any information would be appreciated. I'd rather not have to go
> through this
> whole package and add a lot of OS based case statements.

My advice would be to use column and base widgets for program
layout and don't explicitly size *anything*. But maybe it's
too late for this excellent advice. :-(

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: Font compatibility question [message #61518 is a reply to message #61421] Thu, 17 July 2008 10:10 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
pdoherty writes:

> I want a base that holds a stack of widget_buttons, so I create
> a column oriented base and fill it with buttons. I want all
> the buttons to be the same width, so I set it. Otherwise they
> are all sized by the system based on the text that labels them.
> It doesn't get much uglier than that. Is there some other way
> to force them to be the same? I suppose I could create bitmaps
> that were the same size and held the label text, but that is
> ugly programming.

What version of IDL are you running!? This code creates
a stack of buttons all the same size on both my Windows
and UNIX machines:

tlb = Widget_Base(/COLUMN)
b = Widget_Button(tlb, Value='12')
b = Widget_Button(tlb, Value='1234')
b = Widget_Button(tlb, Value='123456')
b = Widget_Button(tlb, Value='12345678')
b = Widget_Button(tlb, Value='1234567890')
b = Widget_Button(tlb, Value='123456789012')
b = Widget_Button(tlb, Value='12345678901234')
b = Widget_Button(tlb, Value='1234567890123456')
Widget_Control, tlb, /realize
END

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: Font compatibility question [message #61520 is a reply to message #61421] Thu, 17 July 2008 10:09 Go to previous message
Michael Galloy is currently offline  Michael Galloy
Messages: 1114
Registered: April 2006
Senior Member
On Jul 17, 11:02 am, pdoherty <pedohe...@earthlink.net> wrote:
> On Jul 17, 12:24 pm, David Fanning <n...@dfanning.com> wrote:
>
>> pdoherty writes:
>>> Any information would be appreciated. I'd rather not have to go
>>> through this
>>> whole package and add a lot of OS based case statements.
>
>> My advice would be to use column and base widgets for program
>> layout and don't explicitly size *anything*. But maybe it's
>> too late for this excellent advice. :-(
>
>> Cheers,
>
>> David
>> --
>
> Thank yo fo rthe advice, but I find that *some* things need to
> be sized or the program gets too ugly.
>
> I want a base that holds a stack of widget_buttons, so I create
> a column oriented base and fill it with buttons. I want all
> the buttons to be the same width, so I set it. Otherwise they
> are all sized by the system based on the text that labels them.
> It doesn't get much uglier than that. Is there some other way
> to force them to be the same? I suppose I could create bitmaps
> that were the same size and held the label text, but that is
> ugly programming.
>
> I tried to avoid explicit sizing of items when I wrote this,
> but found many circumstances in which that led to a very ugly
> layout.
>
> - Peter Doherty

I get the same size buttons for varying text lengths. For example, the
buttons created below all have the same size:

pro mg_buttonwidget_test
compile_opt strictarr

tlb = widget_base(/column)

a = widget_button(tlb, value='First button')
b = widget_button(tlb, value='B')
c = widget_button(tlb, value='last')

widget_control, tlb, /realize
end

Mike
--
www.michaelgalloy.com
Tech-X Corporation
Software Developer II
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: IDLgrAxis set TICKVALUES in specific positions
Next Topic: IDLgrAxis set TICKVALUES in specific positions

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:53:09 PDT 2025

Total time taken to generate the page: 0.00611 seconds