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

Home » Public Forums » archive » Widget Communication
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
Widget Communication [message #53462] Thu, 12 April 2007 04:24
prahladvkumar is currently offline  prahladvkumar
Messages: 18
Registered: March 2007
Junior Member
Dear David,

I am very new to IDL programming. Here is the code that i had written
very recently.
Please look to this. The problem I am facing with this program is---
as and when i click on "Upper" button I am getting the output in upper
case but if I click on the "Upper" again I am getting one more base.If
I click for 10 times I am getting 10 basesbut I want the output in one
base only even if I change the text in the box or even I click the
button n times.



pro widget_linking_pointers_event,ev

widget_control,ev.top,get_uvalue = pstate
widget_control,ev.id,get_uvalue = uval

case uval of
'Lower' : begin
print,'hello'
widget_control,(*pstate).text, get_value = name
base1 = widget_base()
text1 = widget_text(base1)
widget_control,base1,/realize
widget_control,text1, set_value = name
end

'Upper' : begin
widget_control,(*pstate).text,get_value = name
base2 = widget_base()
text2 = widget_text(base2)
widget_control,base2,/realize,/no_copy
widget_control,text2,set_value = strupcase(name)
end

endcase
end

pro widget_linking_pointers

base = widget_base(/row)
button1 = widget_button(base,value = 'Lower',uvalue = 'Lower')
button2 = widget_button(base,value = 'Upper',uvalue = 'Upper')
text = widget_text(base,/editable,uvalue = 'Convert')

widget_control,base,/realize,/no_copy
widget_control,text,get_uvalue = name
state = {text:text,name:name}
pstate = ptr_new(state)
print,pstate
widget_control,base,set_uvalue = pstate
xmanager,'widget_linking_pointers',base

end


Please do the needful

Regards,
Bujji
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: How to plot coloured wire-mesh plot?
Next Topic: Maximum intensity projection (MIP)

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

Current Time: Wed Oct 08 20:01:05 PDT 2025

Total time taken to generate the page: 0.00517 seconds