Calculating table column width [message #448314] |
Fri, 07 January 2005 01:38 |
Eclipse User |
|
|
|
Originally posted by: skrap.post.gmail.com
I'd like to calculate the width for columns in a table where the cells
will have strings of varying lengths so I can set the width of the columns
as the data in the table changes. Pack() works fine for normal tables but
not so good for virtual tables. I'm not sure how to go from the string
length to an int to send to TableColumn.setWidth() and make it work
whatever font, fontsize etc the table might have.
If there is something that does this for virtual tables already, I've
missed it and apologize.
/Johan
|
|
|
|
Re: Calculating table column width [message #448407 is a reply to message #448403] |
Fri, 07 January 2005 23:55 |
Eclipse User |
|
|
|
Originally posted by: skrap.post.gmail.com
I do have all the data already but there can be quite a bit of it so I'd
really rather use a virtual table. I realize it can't pack data it doesn't
have, that's why I'm trying to do something like this since I have the
data and can find the longest strings for each column beforehand. It's not
vital or anything, it'd just be a nice detail.
/Johan
Steve Northover wrote:
> If you have all the data already, don't use a virtual table and set it into
> the table and use pack(). A virtual table can't pack() data it doesn't
> have.
|
|
|
|
Powered by
FUDForum. Page generated in 0.05248 seconds