kryslt / KControls

Free components for Delphi and Lazarus, this is the main repository maintained by the original author.
BSD 3-Clause Clear License
58 stars 32 forks source link

TKGrid.Options := [goColSizing] has no effect, if RowCount is initially set to 1 after creation #40

Closed denpoon closed 1 year ago

denpoon commented 2 years ago
 aGrid3 := TKGrid.Create(self);
 aGrid3.Parent := self;
 aGrid3.Align := alClient;

 aGrid3.Options := aGrid3.Options+[goColSizing];
 aGrid3.RowCount := 1;//adding this line here will disable Column sizing 
 aGrid3.RowCount := 3;
kryslt commented 1 year ago

Not a bug. Setting RowCount to 1 will force FixedRows to 0. Setting RowCount back to 3 will not affect FixedRows, however. When FixedRows is 0 then column sizing by mouse is not available, of course. You have to set FixedRows manually after setting RowCount to 3.