Autor Beitrag
Cube85
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 50



BeitragVerfasst: Fr 22.07.05 12:43 
Hy Leute bräuchte mal ganz schnell Hilfe:
is nichts dolles, aber hab noch nicht rausbekommen wie es geht,

ich will mit OnDrawCell über den State abfragen ob die Cell selektiert ist, und wenn, dann die Schriftfarbe ändern!
Problem is nur, ich weiss nich wie ich den State auslesen kann...

hier nen knappes Codebeispiel:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
procedure TMainform.Stringgrid1DrawCell(Sender: TObject; ACol, ARow: Integer; Rect: TRect; State: TGridDrawState);
begin
  if (State=gdSelected) then
    Stringgrid1.Canvas.Pen.Color:=clGreen;

  ...
end;


weiss nicht wie ich den State auslesen kann ...

Danke für eure Posts :-)

Moderiert von user profile iconraziel: Delphi-Tags hinzugefügt.
jasocul
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6395
Erhaltene Danke: 149

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Fr 22.07.05 12:52 
ausblenden Delphi-Quelltext
1:
 if (gdSelected in State) then					
Cube85 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 50



BeitragVerfasst: Fr 22.07.05 13:05 
Danke für die schnelle Antwort !