widgets sporadically not created. [message #62272] |
Tue, 02 September 2008 16:58 |
stefan[1]
Messages: 2 Registered: April 2008
|
Junior Member |
|
|
I am experiencing a weird bug (not sure whether it's my or IDLs fault
but I have a hunch, as usual...):
I have various widgets in an application. Once in a while one of the
widgets that is supposed to pop up modally only shows its base with
title. The buttons, labels and textboxes that were supposed to be in
there don't show. Weirdly, this only occurs roughly 1 out of 10-20
times, enough to be a nuisance. Has anyone encountered this?
A snippet from the code reads like this:
wTLB = Widget_Base(Title=title, $
Column=1, $
modal=n_elements(widget_id), $
Group_Leader=widget_id, $
/TLB_KILL_REQUEST_EVENTS)
wMessage = Widget_Label(wTLB, value=message)
wButtonArea=Widget_Base(wTLB,row=1)
wYes=Widget_Button(wButtonArea,/align_left,$
value='Yes',uname='Yes',uvalue='Yes')
wNo =Widget_Button(wButtonArea,/align_right,$
value='No', uname='No', uvalue='Yes')
wLabel = Widget_Label(wTLB, value=label)
wText = Widget_Text(wTLB, value=text, /editable, $
xs=(1.5*strlen(text))>20)
ptr = ptr_new({cancel:0,$
answer:'',$
wText:wText,$
text:text})
Widget_Control, wTLB, set_uvalue=ptr
Widget_Control, wTLB, /Realize
Widget_Control, wText, /INPUT_FOCUS
XManager, 'dialog_yesnolabel', wTLB
Cheers, Stefan
|
|
|