I have tried changing column widths to no avail. The image is too far to the left, and short of adding more padding into the bitmap file (add more whitespace on the left and make the image wider) I can’t work out how to solve this!
Why don’t you use the PaintCellText event to do that? Add a ref to the image to your CellTagAt (row, col). Then you can use g.DrawPicture to place it precisely where you want it. My code looks similar to this:
Var mrd As mailrowData, statPict As Picture, offset As Double
if (column=0) then
select case me.CellTagAt(row, 0)
case app.STAT_UNREAD
statPict = msunread
case app.STAT_READ
statpict = msread
...
end select
end if
offset = ((me.RowHeight - statPict.Height) / 2.0) - 0.5
g.DrawPicture (statPict, 5, offset)
The reason you’re having trouble is that the listbox expects the image to be a similar size to the font size, so if the text is 16pt, I’d say expect the picture needing to be 16-20 pt wide.
If you want total control, use CellBackgroundPaint.
Nowadays one may benefit also using SF Symbols (see App Folder); in fact these symbols automatically understand light/dark appearance-settings (code available in one of Xojo Blogs). Using them myself (also) in Listboxes.
If you mean ‘emojis’ in a technical sense as Unicode emojis then you have to wait for a change in the Unicode standard to incorporate the new emojis, and for Apple, Microsoft etc. to support the new code points with appropriate glyphs.
Be aware that emoji support varies by OS. Older MacOS and Windows versions may have a smaller emoji set than newer versions, and Windows 7 doesn’t support emojis at all.
Double check that any emojis you use are able to be displayed in your app’s minimum supported OS.
See Unicode/UTF-8-character table for a complete list of Unicode characters. Emoticons (look like emojis to me) appear almost at the bottom of the long popup menu. So for example: