comp.lang.idl-pvwave archive - RDF feed
type: channel
description: Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
items: Formatting WIDGET_TABLE cells?
items: Re: Formatting WIDGET_TABLE cells?

Formatting WIDGET_TABLE cells?
type: item
description: 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
creator: Harald Jeszenszky
date: 2006-10-23T10:59:15-00:00

Re: Formatting WIDGET_TABLE cells?
type: item
description: 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
creator: jjones
date: 2006-11-21T20:08:29-00:00