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

Home » Public Forums » archive » Getting WIDGET_TABLE Number of rows and columns
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Getting WIDGET_TABLE Number of rows and columns [message #88903] Wed, 02 July 2014 10:33 Go to previous message
Ken G is currently offline  Ken G
Messages: 14
Registered: September 2006
Junior Member
Is there a direct way to ask a WIDGET_TABLE the number of rows and columns it currently has?

I wish WIDGET_TABLE was more forgiving about SET_VALUE and such, but if you exceed the size of the table, IDL throws an error, so it pays to know the size (and set the size) of the table properly before using SET_VALUE to set the contents.
So far, all I've been able to think up is this kludge.

Ncols = N_ELEMENTS( WIDGET_INFO(tableID, /COLUMN_WIDTHS) )
Nrows = N_ELEMENTS( WIDGET_INFO(tableID, /ROW_HEIGHTS) )

Essentially we ask for an array of widths and heights, and then infer the table dimensions from the number of elements in each array.

Thanks!
[Message index]
 
Read Message
Read Message
Previous Topic: Multiple plot with mapCoord
Next Topic: Gaussfit problem

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

Current Time: Wed Oct 08 19:16:14 PDT 2025

Total time taken to generate the page: 0.00382 seconds