Autor Beitrag
Kayo
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 22



BeitragVerfasst: Sa 26.02.05 21:40 
Ich hab ein Problem. Ich habe ein StringGrid mit 40 Spalten aber nur zwei sollen in ihre Breite veränderbar sein. Ich wüsste nicht mal bei welchem Erreigniss oder der gleichen ich ansätzen könnte. Ich hoffe mit kann einer helfen. Danke im vorraus. :)
J.Borchert
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 150

WIN10
XE2 Professional
BeitragVerfasst: Sa 26.02.05 21:52 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
procedure TForm1.sg1MouseMove(Sender: TObject; Shift: TShiftState; X,Y: Integer);
  begin 
         stringgrid.colwidths[StarreSpaltenNummer]:=StarreBreite;
  end;




mfG Juergen

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



BeitragVerfasst: Sa 26.02.05 21:57 
Diese methode sagt mir nicht so zu da ich es ja nicht auslösen will nur weil ich die Maus bewege. Ein bischen zuviel belastung für den PC und unnötig. Ich möchte das das wirklich nur passiert wenn ich im StringGrid selbst die spaltenbreite verändere.
J.Borchert
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 150

WIN10
XE2 Professional
BeitragVerfasst: Sa 26.02.05 22:08 
Dann benutze davor

if stringgrid.colwidths[FesteSpalteNr] < > FesteBreiteSpalte1 then ...

ansonsten auch keine bessere id

_________________
Wer immer macht was er schon kann, bleibt immer das, was er schon ist. "H.Ford"
Kayo Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 22



BeitragVerfasst: Sa 26.02.05 22:43 
Schon gut ich habs alleine geschaft. Danke :D
J.Borchert
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 150

WIN10
XE2 Professional
BeitragVerfasst: So 27.02.05 15:59 
Und wie ?
Ich habe auch gerade ein Grid zu bearbeiten.