Rob_Valk
(Rob Valk)
January 23, 2017, 6:26pm
1
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?
Rob_Valk
(Rob Valk)
January 23, 2017, 6:34pm
4
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
scott_boss
(scott boss)
January 23, 2017, 6:42pm
5
[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
Rob_Valk
(Rob Valk)
January 23, 2017, 6:47pm
8
ok, I’m new with drawing the picture, can you give a hint how to do? what to use?