Autor Beitrag
ThomasQ
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 32



BeitragVerfasst: Fr 03.02.12 19:55 
Hallo!

Ich habe folgendes Problem: In einem StringGrid habe ich jede zweite Zeile farblich hervorgehoben (in DrawCell). Wenn ich jetzt einzelne Zeilen anwähle, wird die blaue Selection-Zeile durch die DrawCell-Routine farblich überschrieben.

Wie behalte ich die Selectionfarbe (blau) in JEDER Zeile bei?

Bereits jetzt vielen Dank für die Hilfe!
Keldorn
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 2266
Erhaltene Danke: 4

Vista
D6 Prof, D 2005 Pro, D2007 Pro, DelphiXE2 Pro
BeitragVerfasst: Fr 03.02.12 21:00 
Hallo

du hast je dein ondrawcell nicht gezeigt ,-).

aber gdselected ist dein Freund
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
      if gdselected in State then
        begin
          Grid.canvas.Brush.Color := clHighlight;
          Grid.canvas.font.Color  := clHighlightText;
        end
       else
        ... 
      ... Hintergrund + Text zeichnen


Gruß Frank

_________________
Lükes Grundlage der Programmierung: Es wird nicht funktionieren.
(Murphy)
ThomasQ Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 32



BeitragVerfasst: Fr 03.02.12 22:28 
Vielen Dank für die Lösung...und die Nachhilfe! :-)