[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.platform.swt] Re: LabelProvider and icon
|
This is a known Windows "problem". It's actually working as intended (I
think, although I don't see this behavior in most windows apps), but I agree
it's nasty.
The trick is to create column before all your other ones, but set it to
width 0 and to not be resizable (nor moveable if you do that stuff), so
basically it's invisible. Then just put all your data in the the other
columns (at index 1+) and images will show up correctly without spacing out
any other columns.
I should mention however, that this trick does not work on Mac. So if you
are doing stuff for both platforms, do a mac/windows check before you create
that, and remember to offset your counts by 1 depending on the platform. I
don't know how Linux does it.
Emil
"eyecanseeyou" <eyecanseeyou@xxxxxxx> wrote in message
news:d55e8b$thn$1@xxxxxxxxxxxxxxxxxxx
> Hello,
>
> I have a Table with 5 columns.
>
> ______________________________________
> | COL1 | COL2 | COL3 | COL4 | COL5 |
> --------------------------------------
> | TEXT | TEXT | TEXT | IMAGE | IMAGE |
> | TEXT | TEXT | TEXT | IMAGE | IMAGE |
> | TEXT | TEXT | TEXT | IMAGE | IMAGE |
> ...
>
> When I display an image in the 4th column for example, the text in my 1st
> column is shifted on the right (equals the image width). AND in the same
> time if I add an image in the 5th column then it is resized to the size on
> my image in the 4th column.
>
> What is wrong ?
> Thanks.