Einzelnen Beitrag anzeigen

Benutzerbild von punker76
punker76

Registriert seit: 11. Jan 2004
Ort: Alsdorf
98 Beiträge
 
Delphi 7 Personal
 
#5

Re: StringGrid --> FixedRows nicht neu zeichnen (OnDrawCe

  Alt 1. Jun 2005, 07:26
Zitat von ereetzer:
hmm, hab aber ne Abfrage drin:

if ARow > 0 then... das klappt aber trotzdem nicht.

edit:

hier mal nen bißchen Code aus OnMouseUp:

Delphi-Quellcode:
procedure TForm4.StringGrid1MouseUp(Sender: TObject; Button: TMouseButton;
  Shift: TShiftState; X, Y: Integer);
var
  iColumn, iRow: integer;
  Bild: TBitmap;
  Rect: TRect;
begin
  sort := not sort;
  StringGrid1.MouseToCell(X, Y, iColumn, iRow);
  if (iRow = 0) and (iColumn <> -1) then
  begin
    SortStringGrid(StringGrid1, iColumn, sort);
  end;

  if iRow = 0 then
  begin
    Bild := TBitmap.Create;
    Bild.LoadFromFile('C:\Blau.bmp'); // TEST
    Rect := StringGrid1.CellRect(iColumn, iRow);
    StringGrid1.Canvas.StretchDraw(Rect, Bild);
  end;
du solltest das bild im constructor laden und im OnDrawCell (der name sagts ja schon) in die jeweilige zelle in den fixedrows zeichnen!
Jan Karger
Punk's not dead!!!
  Mit Zitat antworten Zitat