Re: sub-widget function creates button widgets with different values each time called [message #40104] |
Thu, 22 July 2004 14:14  |
Mark Hadfield
Messages: 783 Registered: May 1995
|
Senior Member |
|
|
David Fanning wrote:
> Michelle Yong writes:
>> Somewhat unrelated, but if you wish to place a simple vertical line
>> across an image object, do you have to make the image semi-transparent
>> to see the line?
> Only if you put the line behind the image. :-)
> Check your Z value.
With images (IDLgrImage objects) it's the drawing order that counts.
This is determined by the order in which the objects were added to the
graphics container.
On the other hand if the image is a texture-map on an IDLgrPolygon or
similar, then Z values are what matter.
--
Mark Hadfield "Ka puwaha te tai nei, Hoea tatou"
m.hadfield@niwa.co.nz
National Institute for Water and Atmospheric Research (NIWA)
|
|
|
Re: sub-widget function creates button widgets with different values each time called [message #40108 is a reply to message #40104] |
Thu, 22 July 2004 09:58   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Michelle Yong writes:
> I created a small function to create a modal or top-level base to pop
> up for user input. The base has a CW_FIELD widget and two buttons
> that say 'ok' and 'cancel'. The first time the big program calls the
> function the two buttons indeed say 'ok' and 'cancel'. The second
> time the function is called in the same session of the big program,
> the CW_FIELD widget has its initial value right, but the two buttons
> say 'button38' or 'button39' or 'button72', etc. and obviously don't
> match up with anything in the CASE statement in the event handler.
> Any tips? I have another widget-creating function that works fine, so
> I can't see what's going wrong, especially since the button values are
> hard-coded into the function. Also, any suggestions for the group
> leader for the modal base (were I to use one)? I arbitrarily picked
> the top-level base of the big interface- does it really matter? I
> switched temporarily to using a top-level base for the pop-up because
> when execution halted for the popup, the whole program doesn't crash
> like with the modal base which refuses to close itself.
Oh, dear. This program sounds scary. It wasn't created
with the GUI Builder, was it?
I can only imagine what is wrong with it, but all the
possibilities boil down to the same "Say, what!?" reaction.
I suspect a programmer misunderstanding. :-)
> Somewhat unrelated, but if you wish to place a simple vertical line
> across an image object, do you have to make the image semi-transparent
> to see the line?
Only if you put the line behind the image. :-)
Check your Z value.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|
Re: sub-widget function creates button widgets with different values each time called [message #40242 is a reply to message #40108] |
Fri, 23 July 2004 10:58  |
ms_yong
Messages: 2 Registered: July 2004
|
Junior Member |
|
|
Apparently, it wasn't the order at all, but the line coordinates not
matching up with the numbers in viewplane_rect.
Wasn't using the GUI builder. Say, what?
Thanks for the quick replies,
Michelle
David Fanning <davidf@dfanning.com> wrote in message news:<MPG.1b69a005367e7d629897e6@news.frii.com>...
> Oh, dear. This program sounds scary. It wasn't created
> with the GUI Builder, was it?
>
> I can only imagine what is wrong with it, but all the
> possibilities boil down to the same "Say, what!?" reaction.
> I suspect a programmer misunderstanding. :-)
>
>> Somewhat unrelated, but if you wish to place a simple vertical line
>> across an image object, do you have to make the image semi-transparent
>> to see the line?
>
> Only if you put the line behind the image. :-)
> Check your Z value.
>
> Cheers,
>
> David
|
|
|