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

Home » Public Forums » archive » Formatting WIDGET_TABLE cells?
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: Formatting WIDGET_TABLE cells? [message #51532 is a reply to message #50937] Tue, 21 November 2006 12:08 Go to previous message
jjones is currently offline  jjones
Messages: 1
Registered: November 2006
Junior Member
It looks like on a table widget the FORMAT keyword to WIDGET_CONTROL
will only be allowed on selected cells, which were ***initialized***
with an explicit FORMAT setting. A bug report has been entered on this.
In the meantime, the below WIDGET_TABLE( ) function call syntax would
work around this problem:

PRO selectable_table_ex
data = string(findgen(6,10))
tlb = widget_base(/COLUMN)
wTable = widget_table(tlb, /EDITABLE, VALUE=data, $
FORMAT=replicate('(d7.3)', size(data, /DIMENSIONS)), $
ALIGNMENT=2)
widget_control, tlb, /REALIZE
widget_control, wTable, USE_TABLE_SELECT=[4,0,4,3], $
FORMAT=replicate('(d4.1)',1,4)
END

Note that this only works if the FORMAT keyword to WIDGET_TABLE( ) is
an array, and it only enables all cells, if that array's size is equal
to the full size of the table.


Harald Jeszenszky wrote:
> Hi,
>
> When I try to format some WIDGET_TABLE columns holding double precision data
> I always get the following error message:
>
> WIDGET_CONTROL, (*ptr).idData, USE_TABLE_SELECT=[4,0,9,9],
> FORMAT='(F15.3)'
>
> %WIDGET_CONTROL: Unable to set format for table widget
>
> If I use ALIGNMENT=2 instead of FORMAT='(F15.3)' the cells are
> right-justified as expected, so it could not be a matter of cell selection.
>
> Any idea?
>
> Thanks,
> Harald
[Message index]
 
Read Message
Read Message
Previous Topic: Re: colour conversion 8 -> 24 bit
Next Topic: colour conversion 8 -> 24 bit

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

Current Time: Sat Oct 11 05:39:38 PDT 2025

Total time taken to generate the page: 0.56306 seconds