Table with only 1 column [message #464760] |
Tue, 29 November 2005 10:59  |
Eclipse User |
|
|
|
Originally posted by: valerie.berthie.laposteNOSPAM.net
Hi,
I'm trying to do a very simple thing : a table with only 1 column, with
visible header.
Is there a way to force the column to use all available space ?
I don't know why but there is a small space on the right of the column, as
if there was a second column that was not completely displayed.
(You can see exactly this behavior in SWT samples : SWT Controls / Table
Tab)
When the vertical scroll bar appears, this small space is hidden by the
scroll bar, and the problem is solved. But what to do when there is no
scroll bar ?
I've tried to force the column width to be equal to the table width... I've
also tried to call pack() and layout(). I've tied setResizable(false) But it
still doesn't work.
Is it a bug or do I miss something ?
Thanks in advance
Valerie
|
|
|
Re: Table with only 1 column [message #464772 is a reply to message #464760] |
Tue, 29 November 2005 13:02  |
Eclipse User |
|
|
|
The space is for the vertical scrollbar. You can eliminate the space by
correctly setting the width of the table column. See the following snippet:
http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.sni ppets/src/org/eclipse/swt/snippets/Snippet77.java?rev=HEAD&a mp;content-type=text/vnd.viewcvs-markup
Note that it in this snippet it is very important to listen to the Resize
event of the parent of the Table (not the Table itself).
"Valerie Berthie" <valerie.berthie@laposteNOSPAM.net> wrote in message
news:dmhtud$9rv$1@news.eclipse.org...
> Hi,
> I'm trying to do a very simple thing : a table with only 1 column, with
> visible header.
> Is there a way to force the column to use all available space ?
> I don't know why but there is a small space on the right of the column, as
> if there was a second column that was not completely displayed.
> (You can see exactly this behavior in SWT samples : SWT Controls / Table
> Tab)
> When the vertical scroll bar appears, this small space is hidden by the
> scroll bar, and the problem is solved. But what to do when there is no
> scroll bar ?
>
> I've tried to force the column width to be equal to the table width...
> I've
> also tried to call pack() and layout(). I've tied setResizable(false) But
> it
> still doesn't work.
> Is it a bug or do I miss something ?
> Thanks in advance
> Valerie
>
>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.05032 seconds