Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » TableEditor misallignment when image present in table
TableEditor misallignment when image present in table [message #443048] Fri, 17 September 2004 16:19 Go to next message
Eclipse UserFriend
Originally posted by: graeme_eaves.yahoo.co.uk

-----------
Win2k
Elcipse 3.0
-----------

Hi all,

A B C
+---+------------+--------------------------+
|img| some text | some editable text |
+---+------------+--------------------------+

I am using a TableEditor to make the contents of column C editable when
the user double clicks on a row. Column A displays either a) no image or
b) a warning icon depending on the contents of column C.

If there is no image present in column A then the TableEditor overlays
properly.

However, if there is an image in column A ( in any row - the image doesn't
even need to be in the same row on which the TableEditor is being
displayed ), then the TableEditor control displays with a horizontal
offset which looks to be the width of the image, even though the image is
in a separate column ( and also separate row! ).

Is this this a limitation of the TableEditor or am I simply not using it
in the correct way?

Thanks for any help,

Graeme

P.S. My implementation of the TableEditor is very similar to that provided
in the org.eclipse.swt.custom.TableEditor javadoc ( with a couple of
changes, e.g. using MouseAdapter not SelectionAdapter ).
Re: TableEditor misallignment when image present in table [message #443065 is a reply to message #443048] Fri, 17 September 2004 22:42 Go to previous messageGo to next message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
Windows leaves space for the images even though there may not actually be an
image there. Is this what you are seeing?

"Graeme" <graeme_eaves@yahoo.co.uk> wrote in message
news:cif2q6$obn$1@eclipse.org...
> -----------
> Win2k
> Elcipse 3.0
> -----------
>
> Hi all,
>
> A B C
> +---+------------+--------------------------+
> |img| some text | some editable text |
> +---+------------+--------------------------+
>
> I am using a TableEditor to make the contents of column C editable when
> the user double clicks on a row. Column A displays either a) no image or
> b) a warning icon depending on the contents of column C.
>
> If there is no image present in column A then the TableEditor overlays
> properly.
>
> However, if there is an image in column A ( in any row - the image doesn't
> even need to be in the same row on which the TableEditor is being
> displayed ), then the TableEditor control displays with a horizontal
> offset which looks to be the width of the image, even though the image is
> in a separate column ( and also separate row! ).
>
> Is this this a limitation of the TableEditor or am I simply not using it
> in the correct way?
>
> Thanks for any help,
>
> Graeme
>
> P.S. My implementation of the TableEditor is very similar to that provided
> in the org.eclipse.swt.custom.TableEditor javadoc ( with a couple of
> changes, e.g. using MouseAdapter not SelectionAdapter ).
>
>
Re: TableEditor misallignment when image present in table [message #443132 is a reply to message #443065] Mon, 20 September 2004 09:10 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: graeme_eaves.yahoo.co.uk

> Windows leaves space for the images even though there may not actually be an
> image there. Is this what you are seeing?

Possibly.

To explain what I am seeing: If an image is present in column 1 of any
row then this does indeed cause text in all cells in column 1 to be offset
by the image width regardless of whether an image is present or not in
these cells ( I think this is what you are referring to ). This, however,
does not affect the horizontal offset of text in any other columns.

What I am seeing with the TableEditor control is that, e.g. if an image is
present in column 1, when the TableEditor is displayed in a cell in column
3 the TableEditor Control is offset by what appears to be the width of the
image in column 1 (even if that image is on a different row ). The net
effect of this is that I can see part of the cell (e.g. first few letters)
which the TableEditor control is supposed to be covering, i.e. the overlay
is not flush with the original cell.

It appears that, under win2k atleast, the calculation of the positioning
of the TableEditor control is thrown out by the presence of images in
other colums (?).
Re: TableEditor misallignment when image present in table [message #443139 is a reply to message #443132] Mon, 20 September 2004 14:19 Go to previous messageGo to next message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
Can you post an image? It sounds like a bug.

"Graeme" <graeme_eaves@yahoo.co.uk> wrote in message
news:cim6q9$q4n$1@eclipse.org...
> > Windows leaves space for the images even though there may not actually
be an
> > image there. Is this what you are seeing?
>
> Possibly.
>
> To explain what I am seeing: If an image is present in column 1 of any
> row then this does indeed cause text in all cells in column 1 to be offset
> by the image width regardless of whether an image is present or not in
> these cells ( I think this is what you are referring to ). This, however,
> does not affect the horizontal offset of text in any other columns.
>
> What I am seeing with the TableEditor control is that, e.g. if an image is
> present in column 1, when the TableEditor is displayed in a cell in column
> 3 the TableEditor Control is offset by what appears to be the width of the
> image in column 1 (even if that image is on a different row ). The net
> effect of this is that I can see part of the cell (e.g. first few letters)
> which the TableEditor control is supposed to be covering, i.e. the overlay
> is not flush with the original cell.
>
> It appears that, under win2k atleast, the calculation of the positioning
> of the TableEditor control is thrown out by the presence of images in
> other colums (?).
>
>
>
Re: TableEditor misallignment when image present in table [message #443317 is a reply to message #443139] Wed, 22 September 2004 14:42 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: graeme_eaves.yahoo.co.uk

> Can you post an image? It sounds like a bug.
>

I have posted some screenshots.
Image no. 4) is the pertinent image showing the overlay error

1) A basic table with row 5 selected (works as expected)
http://graeme.eaves.freewebspace.com/table_no_image.gif

2) The same table with an editor control, with text selected, overlayed
(works as expected)
http://graeme.eaves.freewebspace.com/tableeditor_no_image.gi f

3) Similar to 1) except image present in last row (works as expected)
http://graeme.eaves.freewebspace.com/table_image.gif

4) Similar to 2) except image present in last row (unexpected result)
http://graeme.eaves.freewebspace.com/tableeditor_image.gif
Re: TableEditor misallignment when image present in table [message #443319 is a reply to message #443317] Wed, 22 September 2004 15:39 Go to previous message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
Great! Please enter a bug report and attach the code and images to it.

I can't see how 3) and 4) differ. They seem to be the same table containing
the same data. Must be the creation order?

"Graeme" <graeme_eaves@yahoo.co.uk> wrote in message
news:cis2vq$nbf$1@eclipse.org...
> > Can you post an image? It sounds like a bug.
> >
>
> I have posted some screenshots.
> Image no. 4) is the pertinent image showing the overlay error
>
> 1) A basic table with row 5 selected (works as expected)
> http://graeme.eaves.freewebspace.com/table_no_image.gif
>
> 2) The same table with an editor control, with text selected, overlayed
> (works as expected)
> http://graeme.eaves.freewebspace.com/tableeditor_no_image.gi f
>
> 3) Similar to 1) except image present in last row (works as expected)
> http://graeme.eaves.freewebspace.com/table_image.gif
>
> 4) Similar to 2) except image present in last row (unexpected result)
> http://graeme.eaves.freewebspace.com/tableeditor_image.gif
>
>
Previous Topic:How to find out which column what doubled clicked in a table viewer
Next Topic:Children getting focus
Goto Forum:
  


Current Time: Fri Apr 26 06:52:57 GMT 2024

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

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

Back to the top