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

Re: IDLgrLegend geometry

"David Fanning" <davidf@dfanning.com> wrote in message
> In this program, I have RECOMPUTE_DIMENSIONS set to
> 2. Notice when you resize the window that the text
> sizes remain the same size. (I still doesn't understand
> why this should be so, and I am looking for enlightenment
> on this point.) But if you change all the RECOMPUTE_DIMENSIONS=2
> to RECOMPUTE_DIMENSIONS=0 you will find that the text
> is size proportionally to the axes, the data, etc. This
> is the behaviour I want.

Oops. I am guilty (again) of not thinking and observing carefully enough
before I post. RECOMPUTE_DIMENSIONS does work exactly as you say and I think
that is the opposite of what I implied in my earlier message. However,
unlike you, David, I prefer my text to stay the same size when I resize my
windows so I tend to use RECOMPUTE_DIMENSIONS = 2.

BTW the legend test program I referred to earlier is mgh_example_legend, of
which there is a copy at


but don't bothering downloading it right now because somebody told me it's
broken. I will fix it shortly.

Anyway, when I run mgh_example_legend (fixed version) and resize the window,
all the symbols (including the ones in the legend) scale with the window and
all the text (including the legend labels) keeps a constant size. This
behaviour seems reasonable to me.

Looking back at your original post, George, I am not sure what you mean by
"resize correctly to fit the new dimensions". Do you want the legend text to
scale with the window size? Perhaps you should try changing the IDLgrLegend
code so that text objects are created with RECOMPUTE_DIMENSIONS = 0.

This business of being an IDL guru is very hard, what with making yourself
look silly all the time and having people tell you your code is broken. I
think I'll take a breather. How do you manage it, David?

Mark Hadfield
m.hadfield@niwa.cri.nz  http://katipo.niwa.cri.nz/~hadfield
National Institute for Water and Atmospheric Research