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

Home » Public Forums » archive » Re: IDLgrLegend geometry
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: IDLgrLegend geometry [message #23880 is a reply to message #23879] Mon, 26 February 2001 20:26 Go to previous messageGo to previous message
George Constantinides is currently offline  George Constantinides
Messages: 16
Registered: July 2000
Junior Member
Mark Hadfield wrote:

> "David Fanning" <davidf@dfanning.com> wrote in message
> news:MPG.150498b583111c38989d69@news.frii.com...
>> George Constantinides (gconstantinides@mhl.nsw.gov.au) writes:
>>
>>> I was resizing an IDLgrWindow object and noticed that objects such as
>>> IDLgrAxis, IDLgrPlot,IDLgrText resized correctly to fit the new
>>> dimensions, but IDLgrLegend did not.
>>> [...]
>>
>> Humm. It's pretty clear that the author of IDLgrLegend
>> was *trying* to solve this problem in the ComputeDimensions
>> method. Have you tried using this when you resize or change
>> to another destination device? It looks to me like this
>> would solve all your problems, although I confess I've
>> never used IDLgrLegend.

I tried calling ComputeDimensions explicitly but I was not making any sense
of the result so I gave up on this approach.

>
>
> From my reading of the IDLgrLegend code in version 5.4, ComputeDimensions is
> called every time the legend is re-drawn, so there should be no need to call
> it manually. ComputeDimensions recalculates the dimensions of the legend's
> atoms based on the character size of the legend text, and since the text
> objects are created with RECOMPUTE_DIMENSIONS = 2, the legend should be
> resized every time it is drawn.

>
> In fact on my system legends do get resized as the size of the destination
> device changes! I wonder why they don't on yours, George. What version are
> you using? Do you have a line that looks like this in the CreateGlyphs
> method in idlgrlegend__define.pro?
>
> (*self.pTexts)[index] = OBJ_NEW('IDLgrText', $
> FONT = self.oFont, $
> COLOR = (*self.pText_Color), $
> STRINGS = (*self.pItem_Name)[index],$
> RECOMPUTE_DIMENSIONS = 2)
>
> If you want to debug this you could put a break in ComputeDimensions and see
> what's happening. (Warning: you may be surprised how often a model's Draw
> method is called.)
>

I am using 5.4 on NT.
Now that I know it works for someone I'll go and have another look.


George Constantinides
Manly Hydraulics Laboratory
URL http://www.mhl.nsw.gov.au
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: string manipulation
Next Topic: Re: Frustrating array in structure. Please help

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

Current Time: Wed Oct 08 19:05:31 PDT 2025

Total time taken to generate the page: 0.00432 seconds