Einzelnen Beitrag anzeigen

Benutzerbild von s.h.a.r.k
s.h.a.r.k

Registriert seit: 26. Mai 2004
3.159 Beiträge
 
#2

AW: ListBox Item Farbe bekommen

  Alt 11. Apr 2012, 12:12
Müsste das nicht so gehen?
Delphi-Quellcode:
var
  C : TColor;
begin
  Index := ListBox1.ItemIndex;
  if (Index > -1) and (Index < ListBox1.Count) then
  begin
    C := TColor(ListBox1.Objects[Index]);

  end;
end;
Du hast den Code zum auslesen doch auch schon da stehen! Vergleiche mal deine ListBox1DrawItem-Methode mit dem Code, den ich hier gepostet habe.
»Remember, the future maintainer is the person you should be writing code for, not the compiler.« (Nick Hodges)
  Mit Zitat antworten Zitat