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

Home » Public Forums » archive » Re: updating a different widget from the event handler
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: updating a different widget from the event handler [message #29954 is a reply to message #29936] Tue, 26 March 2002 09:49 Go to previous messageGo to previous message
James Kuyper is currently offline  James Kuyper
Messages: 425
Registered: March 2000
Senior Member
David Higgins wrote:

> I have set up my first ever GUI and it runs ok. I have a "Browse"
> button and a text widget for a file path. I would like to have the
> file path appear in the text widget after clicking on Browse and
> choosing a file. Getting the path is easy (I named it "newpath"), but
> how to update the text widget (which is called "source") is beyond me.
>
> I tried
> widget_control, source, set_value=newpath
> but the event handler has never heard of "source"...it thinks it's an
> undefined variable.

It's probably correct. "source" is not the name of the widget, it's the
name of a variable in which you stored the widget ID number. The only
variables that an event handler knows about are the ones that are given
a value in that event handler itself, or that are stored in a common
block that the event handler uses. Many program use common blocks for
this purpose, but there are nasty problems with that approach. Storing
the widget ID of the text widget inside the button widget, as David
describes, is a better way to do this.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Image scale as 0 - 4096 instead of 0 - 255
Next Topic: Re: color labrynth

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

Current Time: Sat Oct 11 04:26:38 PDT 2025

Total time taken to generate the page: 1.11929 seconds