Re: Widget_Control [message #2408 is a reply to message #2359] |
Wed, 29 June 1994 09:40   |
8015
Messages: 52 Registered: November 1993
|
Member |
|
|
In article <Cs4p1L.1st6@yuma.acns.colostate.edu>,
<dean%phobos.dnet@sirius.cira.colostate.edu> wrote:
>
> I am attempting to use WIDGET_CONTROL to pass a structure to a widget
> _EVENT PRO. However, I am getting an invalid event id. I am working with
> IDL for Windows 3.5.1.
>
> ================================= Error ===================================
> IDL> mine
> % WIDGET_EVENT: Invalid widget identifier: 33.
>
> ===================================== Mine.pro ===============================
I didn't make a thorough effort at debugging this because of some
problems you need to take care of first. Each of the widget_id's on the
left hand side of the "=" need to be unique names. These will store a
"long" value as the widget is created. In several places you are
reusing the same name which will cause the previous widget's id of the
same name to be lost.
>
> wBase = WIDGET_BASE(title = name, GROUP_LEADER = Parent)
> wBase = WIDGET_BASE(/COLUMN)
> wBase2 = WIDGET_BASE(wBase, /ROW)
> wButton = WIDGET_BUTTON(wBase2, VALUE="Image1", UVALUE="IMAGE1")
> wButton = WIDGET_BUTTON(wBase2, VALUE="Image2", UVALUE="IMAGE2")
> wBase2 = WIDGET_BASE(wBase, /ROW)
> wButton = WIDGET_BUTTON(wBase, VALUE="Quit", UVALUE="QUIT")
>
Each of these names need to be unique. You can use wBase1, thru wBase4
(or something more descriptive), and maybe im1_button, im2_button and
quit_button instead of the wButton's. I'll take another look if you are
still having problems after resolving the naming issue.
I've done what you are trying to do (two drawing widgets with info from
each) and don't mind providing info along the way. Maybe I can keep you
out of some of the same pits I fell into.
Mike Schienle Hughes Santa Barbara Research Center
8015@sbsun0010.sbrc.hac.com 75 Coromar Drive, M/S B28/87
Voice: (805)562-7466 Fax: (805)562-7881 Goleta, CA 93117
|
|
|