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

Home » Public Forums » archive » textbox value on destroy?
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: textbox value on destroy? [message #28706 is a reply to message #28622] Fri, 04 January 2002 08:32 Go to previous messageGo to previous message
btt is currently offline  btt
Messages: 345
Registered: December 2000
Senior Member
Gert Van de Wouwer wrote:

>
> yep, thats the obvious thing. Unfortunately, I cannot figure out WHEN to do
> this in the case that the user closes the apllication.

You can always make the value of the text box a returned keyword value. You
will need to set up an event handler that will store the value of the text
field somewhere in the top level base's uValue as a pointer. Anytime the user
modifies the text object, the event handler will store its value in the TLB's
uvalue. After the widget portion of the application is destroyed, the pointer
reference still exists and the value it points to can be retrieved.

I'm a bit rusty with this stuff and you will probably find a much better
example on David's webpage.

PRO MyApp, TheText = TheText

If n_elements(TheText) EQ 0 Then TheText = ''
TxtPtr = Ptr_new(TheText)

tlb = widget_base(.....)
build gui here

Info = {TxtPtr:TxtPtr, other things here too}

Widget_Control, tlb, set_Uvalue = info, /no_copy

XMANAGER, .....

TheText = *TxtPtr ;<----- get the value from the pointer
Ptr_Free, TxtPtr ;<---- free the pointer

Return
END


Later....

I just looked at http://www.dfanning.com/programs/textbox.pro and this is
indeed a much better example.

Ben

--
Ben Tupper
Bigelow Laboratory for Ocean Science
180 McKown Point Road
West Boothbay Harbor, ME 04575
www.bigelow.org
btupper@bigelow.org
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Windows XP problems
Next Topic: Re: Two-page PostScript output

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

Current Time: Thu Oct 09 21:05:43 PDT 2025

Total time taken to generate the page: 0.80158 seconds