Autor Beitrag
Dee-M-Cee
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 24



BeitragVerfasst: Fr 14.04.06 16:12 
Hallo.
Die Breite der FixedCols ändert sich, wenn man die DefaultColWidth verändert.
Wie kann es aber machen, dass meine FixedCols zb 20px breit sind und alle normalen Cols 50px ?
Lannes
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2352
Erhaltene Danke: 4

Win XP, 95, 3.11, IE6
D3 Prof, D4 Standard, D2005 PE, TurboDelphi, Lazarus, D2010
BeitragVerfasst: Fr 14.04.06 17:34 
Hallo,

erstmal alle auf 50,
dann eine Schleife, oder wenn die Anzahl FixedCols fest ist, gezielt die Breite von 50 setzen.
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
var z : Integer;
begin
  StringGrid1.DefaultColWidth := 50;
  for z := 0 to StringGrid1.FixedCols-1 do
    StringGrid1.ColWidths[z] := 20;

_________________
MfG Lannes
(Nichts ist nicht Nichts) and ('' <> nil ) and (Pointer('') = nil ) and (@('') <> nil )