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

Home » Public Forums » archive » Widget Basics: Updating a text_widget after user input
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 Basics: Updating a text_widget after user input [message #52747] Thu, 01 March 2007 12:16
r083r7 is currently offline  r083r7
Messages: 6
Registered: March 2007
Junior Member
I'm just starting to learn the basics of widgets in IDL after
purchasing David's superb book.

What I'm doing at the minute is using a text widget to display
information from a file. The file contains a large number of scans and
I'm selecting the scan number from a list dropdown box and then want
the text_widget to refresh with the new scan number and the graphics
window to display the new scan.

At the minute the graphics window partly works, once I select a scan
from the dropdown box and then try to trigger another event elsewhere
via one of the other buttons the graphics window refreshes but the
widget_text doesn't refresh with the new value.

I'm storing all of the values in an anonymous info structure as David
recommends and the following is my event handler to handle the scan
being selected from the dropdown box:

PRO select_scan_spectral_plotter,event
widget_control,event.top,get_uvalue=info, /no_copy

widget_control, event.id, get_value=scan_list

info.control_panel_info.scan_number=scan_list[event.index]

;widget_control,
info.control_panel_info.scan_number,set_value=scan_list[even t.index]

print, scan_list[event.index]
widget_control,event.top,set_uvalue=info, /no_copy
END

This prints out the new scan number as I'd expect but I'm not sure how
to get it to refresh the text_widget.

My main event handler is:

PRO spectral_plotter_main_TLB_Events, event

Widget_Control, event.top, Get_UValue=info, /No_Copy
WSet, info.wid
plot_l1b_spectra,info ;procedure to plot spectra
Widget_Control, event.top, Set_UValue=info, /No_Copy

END

What this bit does is plots the spectra using the scan number as one
of the arguements and this bit partly works but the image isn't
displayed until an action somewhere else is attempted.

Any help on this would be great. I'm not sure how well I've explained
this so if it's not clear I can try to make it clearer.

Cheers

Rob
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: IDL Online help-- Windows-- Favorites
Next Topic: Re: Widget Basics: Updating a text_widget after user input

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

Current Time: Fri Oct 10 10:22:20 PDT 2025

Total time taken to generate the page: 0.31544 seconds