Einzelnen Beitrag anzeigen

API

Registriert seit: 18. Apr 2004
637 Beiträge
 
#13

Re: Listbox Items unselektierbar machen ohne Enabled propert

  Alt 17. Jan 2008, 10:06
oder so?

Delphi-Quellcode:
with (Control as TListBox) do
  begin
    Canvas.Brush.Color := Color;
    Canvas.Font.Color := Font.Color;
    canvas.FillRect(rect);
    DrawText(Canvas.Handle,
      PChar(Items[Index]),
      -1,
      Rect,
      DT_SINGLELINE or DT_VCENTER);
    if odSelected in state then
      Canvas.DrawFocusRect(rect);
  end;
  Mit Zitat antworten Zitat