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

Home » Public Forums » archive » What is wrong with these widgets?
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
What is wrong with these widgets? [message #9897] Mon, 15 September 1997 00:00
hegde is currently offline  hegde
Messages: 17
Registered: December 1995
Junior Member
Hi,

While porting my IDL4.0 program to IDL5.0, I came across this weird behavior
of widgets. The widget 'junk' ( see the code below ) starts expanding when the
label widget 'data_val' gets updated. The widget tree is as follows:
base
|
------------------------
| |
con_base dis_base
| |
-------------- -----------
| | |
junk data_val draw_area


I tested it under IRIX6.2 ( SGI Indy, Indigo2 ) and IRIX6.4 ( SGI Octane ).
Can somebody explain this?.

Thanks,

-M. Hegde
-----------------------------cut here--------------------------------------
PRO draw_event, event
; when there is a mouse event, display a random number
widget_control, event.top, get_uvalue=info
str = STRING ( format='(G13.7)',randomu(s))
widget_control, info.val, set_value=str[0]
end

PRO test_event, event
END

PRO test
; create the base
base = WIDGET_BASE ( /ROW, /NO_COPY, TITLE='Display' )

con_base = WIDGET_BASE ( base, COLUMN=1 )
dis_base = WIDGET_BASE ( base, COLUMN=1 )

width = 60
; create a dummy widget
junk = WIDGET_BASE ( con_base, ROW=2, /FRAME )

l_base = con_base
; create a label widget for display
data_val = WIDGET_LABEL ( l_base, VALUE='no data', $
XSIZE=3*width, /FRAME )
; create a drawing area
draw_area = WIDGET_DRAW ( dis_base, XSIZE=100, YSIZE=100, $
/motion_events, event_pro='draw_event' )

info = { val:data_val, draw_area:draw_area }
; realize the base
WIDGET_CONTROL, base, /REALIZE, SET_UVALUE=info
; manager it
XMANAGER, 'test', base, EVENT_HANDLER='test_event'
END

-------------------------------cut here---------------------------------------
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: What is wrong with these widgets?
Next Topic: FORTRAN to IDL translator

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

Current Time: Thu Oct 09 12:02:12 PDT 2025

Total time taken to generate the page: 0.56300 seconds