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

Home » Public Forums » archive » Re: Widget Communication
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 Communication [message #53457] Thu, 12 April 2007 07:22
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
prahladvkumar@gmail.com writes:

> 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.

Well, don't create new widgets when you click the buttons.
Just get the text out of the one text widget you have, change
it, and put it back. Your event handler should look like this:

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
widget_control,(*pstate).text, set_value = StrLowCase(name)
end

'Upper' : begin
widget_control,(*pstate).text,get_value = name
widget_control,(*pstate).text,set_value = StrUpCase(name)
end

endcase
end

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Previous Topic: Re: Maximum intensity projection (MIP)
Next Topic: Function minimization

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

Current Time: Thu Oct 09 08:29:31 PDT 2025

Total time taken to generate the page: 0.79870 seconds