TableEditor misallignment when image present in table [message #443048] |
Fri, 17 September 2004 16:19 |
Eclipse User |
|
|
|
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 #443132 is a reply to message #443065] |
Mon, 20 September 2004 09:10 |
Eclipse User |
|
|
|
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 (?).
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03220 seconds