Autor Beitrag
Timbo
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 166



BeitragVerfasst: Di 05.10.04 00:06 
moin,

ich möchte bei meinen SringGrids gerne oben (rechtsbündig) diese sortierdreiecke haben.
wie ist denn da der beste absatz?
also wie ich die funktion umsetzen muss ist kein problem.
geht mit um die grafische darstellung der dreiecke.
schön wäre wenn ich ein gif in die spaltenköpfe einsetzen könnte.
würde dann das dreick in photoshop bauen und könnte sogar um das dreieck herum transparent machen.
mit einem bitmap würde auch gehen... dann halt ohne transparenz.

bin mit diesem canvas-kram nicht so fit.

vielen dank.
tim.
Böser Borstel
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 154



BeitragVerfasst: Di 05.10.04 08:03 
das müßte dir schon etwas helfen, male ein bild in stringgrid

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
procedure TForm1.StringGrid1DrawCell(Sender: TObject; ACol, ARow: Integer;
  Rect: TRect; State: TGridDrawState);
var
  Org: TPoint;
begin
  if Sender is TStringGrid then
    with Sender as TStringGrid do
      if ARow < FixedRows then
      begin
        Org := ScreenToClient(ClientToScreen(Rect.TopLeft));
        Canvas.Draw(Org.X + 2 + Canvas.TextWidth(Trim(Cells[ACol, ARow])), Org.Y + ((DefaultRowHeight - Canvas.TextHeight(Trim(Cells[ACol, ARow]))) div 2), Image1.Picture.Graphic);
      end;
end;


Moderiert von user profile iconChristian S.: Code- durch Delphi-Tags ersetzt.
Timbo Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 166



BeitragVerfasst: Di 05.10.04 09:01 
supi, vielen dank, funzt prima. :D
muss nur noch die positionierung anpassen und das wars...

das forum ist echt nee glatte 1 :wink:
Böser Borstel
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 154



BeitragVerfasst: Di 05.10.04 09:14 
das forum ist müßte sogar eine 1+++++++++++++Periode+++++... bekommen