![]() |
|
#1
|
||||
|
||||
![]() пытаюсь раскрасить ListBox:
Код:
procedure TForm1.ListBox2DrawItem(Control: TWinControl; Index: Integer; Rect: TRect; State: TOwnerDrawState); begin if odSelected in State then begin ListBox2.Canvas.Brush.Color:=clLime; ListBox2.Canvas.Font.Color:=clBlack; end; if Index=N then begin ListBox2.Canvas.Brush.Color:=clBlue; ListBox2.Canvas.Font.Color:=clWhite; end; ListBox2.Canvas.FillRect(Rect); ListBox2.Canvas.TextOut(Rect.Left+2,Rect.Top,ListBox2.Items[Index]); end; ![]() |