Danke, normalerweise benutze ich immer die ListBox_OnDemand, die hat das Problem nicht, deshalb bin ich gestolpert....
Gruß Stefan > Wenn das Picture nil wäre, gäbe es evtl. eine Nilobject exception, und keine > Outofbounds exception. Letztere bekommt Stefan hier weil der > CellBackgroundPaint auch für Zeilen feuert, die leer sind (der Debugger hätte > Dir das verraten, Stefan). So umgeht man das: > > if column=0 and row< me.listcount then > if me.cell(row,14)="1" then g.DrawPicture adr_16,1,1 > end if > end if > > Maximilian Tyrtania Software-Entwicklung > Dessauer Str. 6-7 > 10969 Berlin > http://www.contactking.de > > Am 11.03.2011 um 17:31 schrieb Stefan Mettenbrink: > >> Stefan Sicurella wrote: >> >>> Function CellBackgroundPaint(g As Graphics, row As Integer, column As >>> Integer) As Boolean >>> if column=0 then >>> if me.cell(row,14)="1" then g.DrawPicture adr_16,1,1 >>> end if >>> return true >>> End Function >>> >>> >>> Hat jemand eine Idee? >> >> Ähnliches mache ich auch. Ist das Picture evt. Nil? >> >> So sieht es bei mir aus: >> >> if column=1 then >> if me.cell(row,column)="1" then >> g.drawpicture buttonpressed,(g.width-buttonpressed.width)/2,0 >> else >> g.drawpicture button,(g.width-button.width)/2,0 >> end >> ... >> end >> >> MfG, Metti. >> > >
