TEXTGRIDSSS2: Alignment of icon and text in same cell

Hello,

we want to use the COLUMN properties property and imageprop in a TEXTGRIDSSS2 control simultaneously as described in the documentation in chapter “Example: Using Images inside the TEXTGRID2 Control”.

With 16x12 icons there is no problem combining icon and text in the same cell.
But with 16x16 icons (or larger) the text position differs from cells without icons.
In cells with icon the text is aligned with the bottom of the icon.
In cells without icon the text is positioned in the middle of the cell.

Is there some way to position the text in the middle of the cell even if the cell contains also an icon?

Thanks a lot for your help.
Markus

Hello,
maybe it is possible totry to output your cell in raw HTML

your text

Regards
I.

Hello Ingo!

Thank you very much for your answer.

We want to align vertically, that means the distance from the centre of the image and from the centre of the text to the top and to the bottom of the table cell should be the same.

The element aligns its contents horizontally instead.
This means that the distance from the contents centre to the left and to the right of the table cell becomes the same.

If we set the table cells style to “vertical-align:middle;” text and image are handled as a group and the centre of the group is aligned vertically.
But inside the group the image and the text are “written on the same line”.
This means that the bottom of the image and the baseline of the text have the same distance to the top of the cell.
This is not what we expect.

Perhaps there is a solution if we place a table with one row and two columns inside the table cell.
But there will be two problems:

We are looking for a simple solution.
Our current solution is to use a second set with smaller icons.
We want to avoid this overhead.

We think there is no chance to place raw HTML code inside a TEXTGRIDSSS2 cell in a way which is compatible with Mozilla.
The COLUMN attribute STRAIGHTTEXT is reported to be not available in Mozilla.

Thanks in advance,
Markus

Hello,

now I added a screenshot to illustrate Markus’ problem. The images have a height of 16 pixels. As you can see, the texts are not aligned correctly in relation to the images.
Screenshot.JPG