Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Table margins always white???
Table margins always white??? [message #449187] Wed, 19 January 2005 00:41 Go to next message
Bill Ewing is currently offline Bill EwingFriend
Messages: 49
Registered: July 2009
Member
Having used various other table (aka grid) controls in other languages, I
am now trying to make SWT/JFace tables live up to the standards they set.

Drawing a cell completely on your own would seem to be the way out of any
problems where the designers of SWT got a little lazy and left features
out.

The problem I encounter in the leftmost column is, no matter what,
JFace/SWT leaves a white margin along the left edge of the cell. I.e.,
they do not let you draw in the entire cell. Someone made some choices
about aesthetics, and you are stuck with them.

Does anyone have any ideas on how to fix this?
Re: Table margins always white??? [message #449202 is a reply to message #449187] Wed, 19 January 2005 11:44 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: v.j.b

while I sympathize with you over the fact that swt / jface tables are
somewhat lacking in certain areas, most of those instances of 'lazyness' as
you describe them are actually quite logical once you realize that the swt /
jface table widget is nothing more than a wrapper around the native table
widget.

This means that on windows for instance (which i assume you are working on)
there are certain limitations you just can't blame swt for. There is the
(in)famous 'extra column' on the right (normal windows behaviour), the 'can
i have fixed column-headers?' issue (the native table-widget is _not_ an
excel table, and vice-versa), the 'first column ignores alignement styles'
(again, native issue) and the 'multi-line tablecells' issue (again, excel
table != native table).

For all of these things, on which I agree Swing has had 'for years now', it
just boils down to the native / custom drawn policy. Where Swing chooses to
do everything itself, SWT tries to use native things, and only when forced
will it (have to) use custom drawn widgets (iirc tree-widgets are not native
on macosx).

I've been reading this list for quite some time now and almost all of the
issues with tables (and trees) mostly come down to ppl expecting stuff that
'is in Swing'. In the general case, it's very enlightening to first take a
look at, for windows for instance, the MSDN on the control you want to use.
This will give you an idea of what is and is not possible.



As for your question, I have no idea.

PS: don't think I'm trying to bash you in anyway, it's just that you seem to
be stumbling on so many limitations of the table control, I thought i'd
point you at some of the 'causes'.
Re: Table margins always white??? [message #449224 is a reply to message #449202] Wed, 19 January 2005 21:15 Go to previous messageGo to next message
Bill Ewing is currently offline Bill EwingFriend
Messages: 49
Registered: July 2009
Member
varname wrote:


> while I sympathize with you over the fact that swt / jface tables are
> somewhat lacking in certain areas, most of those instances of 'lazyness' as
> you describe them are actually quite logical once you realize that the swt /
> jface table widget is nothing more than a wrapper around the native table
> widget.

> This means that on windows for instance (which i assume you are working on)
> there are certain limitations you just can't blame swt for. There is the
> (in)famous 'extra column' on the right (normal windows behaviour), the 'can
> i have fixed column-headers?' issue (the native table-widget is _not_ an
> excel table, and vice-versa), the 'first column ignores alignement styles'
> (again, native issue) and the 'multi-line tablecells' issue (again, excel
> table != native table).

> For all of these things, on which I agree Swing has had 'for years now', it
> just boils down to the native / custom drawn policy. Where Swing chooses to
> do everything itself, SWT tries to use native things, and only when forced
> will it (have to) use custom drawn widgets (iirc tree-widgets are not native
> on macosx).

> I've been reading this list for quite some time now and almost all of the
> issues with tables (and trees) mostly come down to ppl expecting stuff that
> 'is in Swing'. In the general case, it's very enlightening to first take a
> look at, for windows for instance, the MSDN on the control you want to use.
> This will give you an idea of what is and is not possible.



> As for your question, I have no idea.

> PS: don't think I'm trying to bash you in anyway, it's just that you seem to
> be stumbling on so many limitations of the table control, I thought i'd
> point you at some of the 'causes'.


Hi, you're exactly right. I later realized my problem is column 1. I
already kenw that in Windows it is impossible to get the first column to
be anything but left aligned. So now, I avoid using the first column and
things are much better. Still, I wish that the designers of SWT may have
considered in the getColumnImage method to let the image be the entire
cell. Instead, they make it all of the cell except for some border lines,
making it impossible to completely get what you want, which I do see and
have often gotten in native windows apps.
Re: Table margins always white??? [message #449273 is a reply to message #449202] Thu, 20 January 2005 00:15 Go to previous message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
Well said.

"varname" <v@j.b> wrote in message news:cslh7j$50l$1@www.eclipse.org...
>
> while I sympathize with you over the fact that swt / jface tables are
> somewhat lacking in certain areas, most of those instances of 'lazyness'
as
> you describe them are actually quite logical once you realize that the swt
/
> jface table widget is nothing more than a wrapper around the native table
> widget.
>
> This means that on windows for instance (which i assume you are working
on)
> there are certain limitations you just can't blame swt for. There is the
> (in)famous 'extra column' on the right (normal windows behaviour), the
'can
> i have fixed column-headers?' issue (the native table-widget is _not_ an
> excel table, and vice-versa), the 'first column ignores alignement styles'
> (again, native issue) and the 'multi-line tablecells' issue (again, excel
> table != native table).
>
> For all of these things, on which I agree Swing has had 'for years now',
it
> just boils down to the native / custom drawn policy. Where Swing chooses
to
> do everything itself, SWT tries to use native things, and only when forced
> will it (have to) use custom drawn widgets (iirc tree-widgets are not
native
> on macosx).
>
> I've been reading this list for quite some time now and almost all of the
> issues with tables (and trees) mostly come down to ppl expecting stuff
that
> 'is in Swing'. In the general case, it's very enlightening to first take a
> look at, for windows for instance, the MSDN on the control you want to
use.
> This will give you an idea of what is and is not possible.
>
>
>
> As for your question, I have no idea.
>
> PS: don't think I'm trying to bash you in anyway, it's just that you seem
to
> be stumbling on so many limitations of the table control, I thought i'd
> point you at some of the 'causes'.
>
>
Previous Topic:Hide columns in table
Next Topic:Standalone SWT/JFace application packaging, essential jars
Goto Forum:
  


Current Time: Thu Nov 14 16:20:29 GMT 2019

Powered by FUDForum. Page generated in 0.02366 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top