Einzelnen Beitrag anzeigen

Benutzerbild von p80286
p80286

Registriert seit: 28. Apr 2008
Ort: Stolberg (Rhl)
6.659 Beiträge
 
FreePascal / Lazarus
 
#5

AW: StringGrid OnDrawCell, eigener Inhalt wird überschrieben, wenn Zelle selektiert

  Alt 9. Aug 2012, 15:35
Aber wenn die Zelle "selected" ist wird ja zumindestens der Hintergrund schön gemalt, wenn auch der Inhalt anders gezeichnet wird??

Das mit der Grammatik interessiert mich aber auch
"Was kann ich machen, außer komplett auf ein DrawGrid ????? "

Gruß
K-H

Zusatz:
Zitat:
Delphi-Quellcode:
Cells
        A ColCount by RowCount array of strings which are associated with each
        cell. By default, the string is drawn into the cell before OnDrawCell
        is called. This can be turned off (along with all the other default
        drawing) by setting DefaultDrawing to false.
procedure TStringGrid.DrawCell(ACol, ARow: Longint; ARect: TRect;
  AState: TGridDrawState);
begin
  if DefaultDrawing then
    Canvas.TextRect(ARect, ARect.Left+2, ARect.Top+2, Cells[ACol, ARow]);
  inherited DrawCell(ACol, ARow, ARect, AState);
end;
aus der Unit Grids
Programme gehorchen nicht Deinen Absichten sondern Deinen Anweisungen
R.E.D retired error detector

Geändert von p80286 ( 9. Aug 2012 um 15:42 Uhr)
  Mit Zitat antworten Zitat