Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Center an Image in a table cell
Center an Image in a table cell [message #459559] Wed, 10 August 2005 16:21 Go to next message
Joe Pusateri is currently offline Joe PusateriFriend
Messages: 2
Registered: July 2009
Junior Member
--____VGHNSXBRYVBUNZKRJECY____
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline; modification-date="Thu, 10 Aug 2005 06:21:33
-0500"

If you define a TableColumn with style SWT.CENTER and then use an =
ITableLabelProvider to provide an image with getColumnImage(), the image =
is never affected by the SWT.CENTER style bit. (nor SWT.RIGHT) it is =
always left-justified.

Is there any way to provide an image in a table cell that is centered?

Thanks

Joe
--____VGHNSXBRYVBUNZKRJECY____
Content-Type: multipart/related; boundary="____KHPJYCVUQHZCVHVQLSGP____"


--____KHPJYCVUQHZCVHVQLSGP____
Content-Type: text/html; charset=windows-1252
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment; filename="Text.htm";
modification-date="Thu, 10 Aug 2005 06:21:33 -0500"

<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; charset=3Diso-8859-1"=
>
<META content=3D"MSHTML 6.00.2800.1515" name=3DGENERATOR></HEAD>
<BODY style=3D"MARGIN: 4px 4px 1px; FONT: 10pt Tahoma">
<DIV>If you define a TableColumn with style SWT.CENTER and then use an =
ITableLabelProvider to provide an image with getColumnImage(), the image =
is never affected by the SWT.CENTER style bit.&nbsp; (nor SWT.RIGHT) it is =
always left-justified.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Is there any way to provide an image in a table cell that is =
centered?</DIV>
<DIV>&nbsp;</DIV>
<DIV>Thanks</DIV>
<DIV>&nbsp;</DIV>
<DIV>Joe</DIV></BODY></HTML>
--____KHPJYCVUQHZCVHVQLSGP____--

--____VGHNSXBRYVBUNZKRJECY____--
Re: Center an Image in a table cell [message #459610 is a reply to message #459559] Fri, 12 August 2005 15:35 Go to previous message
Daniel Spiewak is currently offline Daniel SpiewakFriend
Messages: 263
Registered: July 2009
Senior Member
I don't think so. Images are handled separately from the rest of the table cell at a native binding level. The images aren't effected by the SWT.CENTER bitmask or any of the other table cell modifiers.

Daniel

> If you define a TableColumn with style SWT.CENTER and
> then use an ITableLabelProvider to provide an image
> with getColumnImage(), the image is never affected by
> the SWT.CENTER style bit. (nor SWT.RIGHT) it is
> always left-justified.
>
> Is there any way to provide an image in a table cell
> that is centered?
>
> Thanks
>
> Joe
> <div id="jive-html-wrapper-div">
>
> <DIV>If you define a TableColumn with style
> SWT.CENTER and then use an ITableLabelProvider to
> provide an image with getColumnImage(), the image is
> never affected by the SWT.CENTER style bit.
> (nor SWT.RIGHT) it is always left-justified.</DIV>
> <DIV> </DIV>
> <DIV>Is there any way to provide an image in a table
> cell that is centered?</DIV>
> <DIV> </DIV>
> <DIV>Thanks</DIV>
> <DIV> </DIV>
> <DIV>Joe</DIV>
> </div>
Previous Topic:WindowShade 4.x DOES NOT WORK with Eclipse 3.1
Next Topic:Bug or Feature in StyledText: setLineBackground & settings styleRange is shifted 1 pixel
Goto Forum:
  


Current Time: Sun Apr 18 09:53:59 GMT 2021

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

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

Back to the top