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

Home » Public Forums » archive » WIDGET_TABLE: How to set first column width?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
WIDGET_TABLE: How to set first column width? [message #64325] Sat, 20 December 2008 21:29 Go to next message
M. Katz is currently offline  M. Katz
Messages: 69
Registered: May 2005
Member
Using a WIDGET_TABLE, I cannot seem to find a way to set the column
width of the leftmost column, the one that contains the ROW_LABELs.

I can set all of the other column widths. I would consider dropping
the ROW_LABEL column, but it's nice to have a labeled column that
stands still when the user scrolls to the right. Normal columns scroll
along with the table.

Any ideas?

M. Katz
Re: WIDGET_TABLE: How to set first column width? [message #64389 is a reply to message #64325] Mon, 22 December 2008 09:23 Go to previous message
Doug Edmundson is currently offline  Doug Edmundson
Messages: 58
Registered: November 2005
Member
M. Katz wrote:
>> I have not used widget_table before, but what comes to my mind is
>> building the table with row labels are the desired length and then
>> changing the labels out for the "real names" after the widget has been
>> created.
>
> I tried this early on. What I found on OS X (in X Windows) is that the
> width does *not* expand (i.e. unlike WIDGET_LABEL) to fit the label
> size. The WIDGET_TABLE is perfectly happy to show you only a portion
> of the cell's contents. I did not try it on Windows.
>
> Thanks,
> M. Katz

Here's a simple program that'll change the width of the row label column...

pro table_test
tlb = widget_base()
table = widget_table( tlb )
widget_control, table, $
column_width = 200, $
use_table_select = [ -1, 0, -1, 4 ]
widget_control, tlb, /realize
end

You can get the width of string by using widget_info's "string_size"
keyword. Cell attributes (including row and column headers) can be set
with keywords such as "background_color", "foreground_color", "font", etc.

Cheers,
Doug

-- Posted on news://freenews.netfront.net - Complaints to news@netfront.net --
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Another cartesian to spherical question
Next Topic: WRITE_GEOTIFF: Incorrect number of arguments

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

Current Time: Wed Oct 08 17:30:26 PDT 2025

Total time taken to generate the page: 0.00271 seconds