Announcement

Collapse
No announcement yet.

Grid.objects Property

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Grid.objects Property

    Hallo.

    Ich möchte die .objects Property nutzen, um in einer Grid-zelle Farbinfos abzulegen. Die Zuweisung s.u. funktioniert, aber wie rufe ich die enthaltene
    Farbinfo wieder ab?
    Optimal wäre, Foreground und Background-Farben in einem record zu definieren und dies als object abzulegen.

    color : tColor;
    color := clred;
    stringgrid1.Cells[r,c] := 'Test';
    stringgrid1.objects[r,c] := tobject(color);


    abrufen: color := stringgrid1.objects[r,c]; geht nicht.

    Gruß Joe

  • #2
    "Geht nicht" ist echt toll. Gibt es keine Fehlermeldung?
    Aber ich rate mal: probiere es mit

    color := stringgrid1.objects[r,c] as TColor;

    bye,
    Helmut

    Comment


    • #3
      Originally posted by hwoess View Post
      "Geht nicht" ist echt toll. Gibt es keine Fehlermeldung?
      Aber ich rate mal: probiere es mit

      color := stringgrid1.objects[r,c] as TColor;

      bye,
      Helmut
      Hallo Helmut.
      Danke für die schnelle Antwort.
      Dein Vorschlag bringt folgende Compiler-Meldung:
      Operator not applicable to this operand type

      Noch eine Idee?

      Gruß Joe

      Comment

      Working...
      X