Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
I'm having problems with IDL's table widget. I was wondering if anyone has a good tutorial on how to use it. Specifically, I'm having problems when I use widget_control to set the table's value - it does not seem to be updating. Do I have to delete and insert rows all the time? Cheers Phil P.S Please post replies to newsgroup as I need to read them at work :) --== Sent via Deja.com http://www.deja.com/ ==-- ---Share what you know. Learn what you don't.---
Phil Aldis (phil_aldis@my-dejanews.com) writes: > I'm having problems with IDL's table widget. I was wondering if anyone > has a good tutorial on how to use it. Specifically, I'm having problems > when I use widget_control to set the table's value - it does not seem to > be updating. Do I have to delete and insert rows all the time? Don't *EVEN* get me started! :-( Cheers, David -- David Fanning, Ph.D. Fanning Software Consulting Phone: 970-221-0438 E-Mail: davidf@dfanning.com Coyote's Guide to IDL Programming: http://www.dfanning.com/ Toll-Free IDL Book Orders: 1-888-461-0155
phil_aldis@my-dejanews.com wrote: > I'm having problems with IDL's table widget. I was wondering if anyone > has a good tutorial on how to use it. Specifically, I'm having problems > when I use widget_control to set the table's value - it does not seem to > be updating. Do I have to delete and insert rows all the time? > > Cheers > > Phil > > P.S Please post replies to newsgroup as I need to read them at work :) > > --== Sent via Deja.com http://www.deja.com/ ==-- > ---Share what you know. Learn what you don't.--- If you don't define a value keyword in the definition of widget_table you'll never be able to set a value by widget_control. The widget builder did not define value=value in the definition. R.Bauer
The table widget reqires a double click to "activiate"the cell, then a Enter to accept the change. Yes, it is disgracefully unintuitive and undocumented. No, David Fanning is not being unhelpful, but just showing his war wounds (see much discussion in the newgroup archive circa feb-march 1999). Use of the table widget is demoed in the idl routine XVAREDIT which is called in a demo program appended below. As a digression, I repeat a point made last Feb, that the old idl 4.x version of XVAREDIT (same name, different routine, no table widget) is vastly more user friendly, and one I regularly use for editting lists of variables packed into a structure. Who would want to use the dreaded idl5.x table widget, and have program users phone in each day to say the widget has frozen ? (If you want a copy of xvaredit from idl 4.x, email me; Im reluctant to add it to the newgroup since it is rsi copyright). Regards, Michael Asten ; ; program to demonstrate use of XVAREDIT for editting mixed string and ; real numbers, in a widget ; this works in idl 5.x, but note the edit process on each cell of the widget ; requires a double click to "activate" the cell, and a Press Enter ; to confirm changes to the cell. ; This program works more cleanly and more intuitively with the different ; procedure (of the same name) XVAREDIT in IDL 4.x ; (in directory \rsi\idl40\lib). ; ; demo by Michael Asten, Monash University, Melbourne. 9 Jan 99. ; x=10.*indgen(5*36) y=sin(x*!pi/180) plot,x,y xmin=0 & xmax=(5*360) & ymin=-1. & ymax=1. title='XVAR TEST' print,title,xmin,xmax,ymin,ymax ; now set up a structure to pass plot parameters to an edit widget plot_par={plot_title:title,Xaxis_left_limit:xmin,Xaxis_right _limit:xmax, $ Yaxis_lower_limit:ymin,Yaxis_top_limit:ymax} xvaredit,plot_par ; edit the parameters in a widget title=plot_par.plot_title ; now extract the editted parameters from the structure xmin=plot_par.Xaxis_left_limit xmax=plot_par.Xaxis_right_limit ymin=plot_par.Yaxis_lower_limit ymax=plot_par.Yaxis_top_limit print,title,xmin,xmax,ymin,ymax ; print the new values plot,x,y,title=title,xrange=[xmin,xmax],yrange=[ymin,ymax] ; draw the new plot end phil_aldis@my-dejanews.com wrote: > I'm having problems with IDL's table widget. I was wondering if anyone > has a good tutorial on how to use it. Specifically, I'm having problems > when I use widget_control to set the table's value - it does not seem to > be updating. Do I have to delete and insert rows all the time? > > Cheers > > Phil > > P.S Please post replies to newsgroup as I need to read them at work :) > > --== Sent via Deja.com http://www.deja.com/ ==-- > ---Share what you know. Learn what you don't.---