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

Home » Public Forums » archive » Re: widget, draw and file pickup
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: widget, draw and file pickup [message #60726 is a reply to message #60712] Fri, 06 June 2008 14:53 Go to previous messageGo to previous message
Jean H. is currently offline  Jean H.
Messages: 472
Registered: July 2006
Senior Member
Hi again,

ok, Jim Pendleton from ITTVIS found the solution... it is an old bug in
dialog_pickfile (CR 14734). Basically, it triggers an event with some delay.

The workaround from Jim is attached, in case anyone else has the same
problem!

Thanks to Jim and all of you that had a look at this!

Jean

pro doublclickproblem_gui_itt_event, event
widget_control,event.top, get_uValue=info
;BUTTON EVENT
IF (TAG_NAMES(event, /STRUCTURE_NAME) eq 'WIDGET_BUTTON') THEN BEGIN
WIDGET_CONTROL, event.ID, GET_uValue=buttonPressed
if buttonPressed eq "open" then begin
widget_control, event.top, sensitive = 0
result=dialog_pickFile(dialog_parent = event.top)
wait, .1
widget_control, event.top, sensitive = 1
widget_control,info.drawID , /clear_events
endIf
ENDIF

;MOUSE EVENTS
IF (TAG_NAMES(event, /STRUCTURE_NAME) eq 'WIDGET_DRAW') THEN BEGIN
if (event.release eq 1) then $
print, "Click happened"
ENDIF
end



pro doublclickproblem_gui_itt
info = {mainBaseID:0, drawID:0}

;main
mainBaseID = widget_base(/col)
info.mainBaseID=mainBaseID

;display area
info.drawID = widget_draw(mainBaseID, SCR_XSIZE = 850, SCR_YSIZE = 512, /BUTTON_EVENTS)

;Open button
wbaseID = widget_base(mainBaseID,/row, group_leader = mainBaseID, frame=1)
tmp = widget_button(wbaseID,value="Open", uValue="open", toolTip = "Open a file")

widget_control,mainBaseID, set_uValue=info,/realize
xmanager, 'doublclickproblem_gui_itt', mainBaseID
end
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: vertical line that moves with cursor in draw widget
Next Topic: Group specification of format codes on data of varying dimensions

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

Current Time: Sat Oct 11 09:46:11 PDT 2025

Total time taken to generate the page: 1.04240 seconds