Autor Beitrag
oroblram
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 21

Win XP
Delphi 7
BeitragVerfasst: Fr 28.08.09 13:35 
Hallo zusammen,

ist es irgendwie möglich, einer bestimmten Zelle in einem Stringgrid, also z.B. der Zelle Grid1.Cells[3,0], eine andere Hintergrundfarbe zu verpassen oder die Schriftfarbe zu ändern?

Danke schon mal für die Info.
Lannes
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2352
Erhaltene Danke: 4

Win XP, 95, 3.11, IE6
D3 Prof, D4 Standard, D2005 PE, TurboDelphi, Lazarus, D2010
BeitragVerfasst: Fr 28.08.09 13:48 
Hallo,

ja :wink:

Infos dazu gibt es hier reichlich, wenn man sucht.

im Groben(Ereignis OnDrawcell):
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
if (ACol = 3and (ARow = 0then
  begin
  StringGrid1.Canvas.Brush.Color := clRed;
  StringGrid1.Canvas.FillRect(Rect);
  //Text ausgeben
  end;

_________________
MfG Lannes
(Nichts ist nicht Nichts) and ('' <> nil ) and (Pointer('') = nil ) and (@('') <> nil )
oroblram Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 21

Win XP
Delphi 7
BeitragVerfasst: Fr 28.08.09 14:35 
super, danke!!!