Picture is only showing half in listbox

I try to show a picture in a cell of a listbox, but somehow it only shows half the picture, no matter what setting I adjust for this. I have done this before in another application with a smaller picture and that was no problem.
The piccture now is displayed in cell(0), but it is totally pusehed to the leftside of the cell. Allignment and adjusting the values does not change anything.

It is about a Windows desktop application.

Anybody an idea?

What is your drawing code in CellBackgroundPaint?

Are you using rowpicture, or are you drawing the picture in the cellbackgroundpaint event?

I am using rowpicture:

The code in my cellbackgrountpaint:

g.FillRect 0,0,g.width,g.height

If Row > -1 and Row < Me.ListCount then
if EvtArea.celltag(row,column)=“eq” then
EvtArea.RowPicture(row) = EvtArea.RowTag(row)
end if
end if

[quote=311460:@Rob Valk]I am using rowpicture:

The code in my cellbackgrountpaint:

g.FillRect 0,0,g.width,g.height

If Row > -1 and Row < Me.ListCount then
if EvtArea.celltag(row,column)=“eq” then
EvtArea.RowPicture(row) = EvtArea.RowTag(row)
end if
end if[/quote]

please wrap you code in [code] blocks. it makes it much easier to read so it is easier to help you.

Draw it yourself in CellBackgroundPaint you’ll have much better results.

Because rowpicture only shows about 16 pixels, if memory serves

ok, I’m new with drawing the picture, can you give a hint how to do? what to use?

http://documentation.xojo.com/index.php/ListBox.CellBackgroundPaint
http://documentation.xojo.com/index.php/Graphics.DrawPicture

thank you :slight_smile: