>>> unter Windows wird in einer Listbox anscheinend nur eine Spalte selektiert,
>>> wenn ich die Zeile anklicke.
>>> Wie bekomme ich es hin, dass die gesamte Zeile selektiert wird?

So:

Listbox-Subclass anlegen, und dort dann:

Im CellBackgroundPaint event:

#if targetwin32
if me.Selected(row) then
    me.DrawCellBackGroundInColor(g,HighlightColor)
    Return true 
end if
#endif

Private Sub DrawCellBackGroundInColor(g as graphics, aColor as Color)
  g.ForeColor=aColor
  g.FillRect(0,0,g.Width,g.Height)
End Sub

Maximilian Tyrtania



Antwort per Email an