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

Home » Public Forums » archive » DROPLIST bug ?
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
DROPLIST bug ? [message #4972] Mon, 04 September 1995 00:00
nobody is currently offline  nobody
Messages: 12
Registered: September 1995
Junior Member
Sirs,

I have experienced som trouble when altering values in droplists.
When I try to alter the contents ( VALUE ) of a droplist, I also
alter the size of all following WIDGET_LABELS.
When a second call is made, the size of the labels return to their
previous sizes.

The program below displays the problem.
Compile it and run: dropdead
Alter the contents of the droplist by pushing the " Alter list "
button and watch the size of the label ( and the entire widget ) !
Push it once more and the size will return to normal.
Why ?
Is it supposed to be like this ?

------------------------------------------------------------ -------

PRO MAIN1_Event, Event


WIDGET_CONTROL,Event.Id,GET_UVALUE=Ev

CASE Ev OF

'BUTTON': BEGIN
Print, 'Event for button'
alter_list
END
'LIST': BEGIN
Print, 'Event for My droplist'
END
ENDCASE
END



PRO DROPDEAD, GROUP=Group


IF N_ELEMENTS(Group) EQ 0 THEN GROUP=0

junk = { CW_PDMENU_S, flags:0, name:'' }
COMMON MAIN1,main1

MAIN1 = WIDGET_BASE(GROUP_LEADER=Group, $
COLUMN=3, $
SPACE=10, $
XPAD=10, $
YPAD=10, $
MAP=1, $
TITLE='Dropdead test', $
UVALUE='MAIN13')


BUTTON = WIDGET_BUTTON( MAIN1,VALUE='Alter list', $
UVALUE='BUTTON', $
YSIZE=20)

ListVal1 = [ $
'Item 1', $
'Item 2', $
'Item 3' ]
LIST = WIDGET_DROPLIST( MAIN1,VALUE=ListVal1, $
UVALUE='LIST', $
YSIZE=60)


TEXT1 = WIDGET_LABEL(MAIN1,VALUE=' HELLO WORLD ! ', $
UVALUE='TEXT1',$
FRAME=1,$
YSIZE=20)


WIDGET_CONTROL, MAIN1, /REALIZE

XMANAGER, 'MAIN1', MAIN1
END



PRO alter_list
COMMON MAIN1

LIST = WIDGET_INFO(WIDGET_INFO(main1,/CHILD),/SIBLING)
WIDGET_CONTROL,LIST,SET_VALUE=['Thomas','Patrik','Niek ']

END

------------------------------------------------------------ ----------

Yours sincerely,

Thomas Widen
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: random number trap
Next Topic: Re: MESSAGE question

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

Current Time: Wed Oct 08 17:48:37 PDT 2025

Total time taken to generate the page: 0.00470 seconds