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
Re: Getting WIDGET_TABLE Number of rows and columns [message #88919 is a reply to message #88903] Thu, 03 July 2014 09:51 Go to previous message
lecacheux.alain is currently offline  lecacheux.alain
Messages: 325
Registered: January 2008
Senior Member
On Wednesday, July 2, 2014 7:33:47 PM UTC+2, Ken G wrote:
> 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!

What about:
Widget_CONTROL, tableID, GET_VALUE=table
dims = Size(table, /DIM)

alx.
[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: Thu Oct 09 07:36:53 PDT 2025

Total time taken to generate the page: 0.72391 seconds