View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0017538||Lazarus||LCL||public||2010-10-03 14:03||2011-12-01 11:25|
|Reporter||Nikolay||Assigned To||Jesus Reyes|
|Product Version||0.9.29 (SVN)|
|Fixed in Version||0.9.29 (SVN)|
|Summary||0017538: If StringGrid.RowCount=0 then StringGrid.ColCount=0|
|Description||If I set StringGrid.RowCount=0 (in RunTime or in DesignTime), I get also StringGrid.ColCount=0.|
In result, I need to set ColCount always, when clear Grid (StringGrid.RowCount:=0). In Delphi I don't need this.
|Tags||No tags attached.|
|Fixed in Revision|
Delphi do not support grids without cols or rows, if one set ColCount=0 RowCount is automatically set to 1 and viceversa, this in my view is inconsistent and the grid do not do what you ask it to do, it also means that you cannot have a grid without cells. I fixed this inconsistency in Lazarus by supporting a grid without cells or grids with only fixedcols or fixedrows which Delphi do not support.
In Lazarus the intention when the grids is cleared was that it loose all col/row properties, and to be consistent and more logical is that setting colcount or rowcount to 0 means it's cleared and this way it was implemented.
In this case we cannot base Lazarus grids behavior on Delphi Grids as they have different features.
As a request, I have modified the grids so once one property like colcount or rowcount is set after the grid was cleared it recover old rowcount or colcount values respectively, which should fix a couple of bug reports (0017553 and 0017552), in this report it's not said what values should be restored once the grid is cleared but I need to know, if possible, what are your expectations so we can homologate ideas.
As it seems if you set RowCount=0 in Delphi you really obtain a grid with RowCount=1 so what is different from doing RowCount:=1?. If Setting RowCount=0 and RowCount=1 give the same result (I know they give the same number of resulting rows, but I don't know what happen to possible fixed rows or cell content), then you can do the same in Lazarus by setting RowCount=1
I'm resolving this as won't fix because Lazarus grid has a different feature when you set RowCount=0 and I don't want to lose that feature.
|2010-10-03 14:03||Nikolay||New Issue|
|2010-10-03 14:03||Nikolay||Widgetset||=> Win32/Win64|
|2010-10-25 20:52||Jesus Reyes||Status||new => assigned|
|2010-10-25 20:52||Jesus Reyes||Assigned To||=> Jesus Reyes|
|2010-10-26 00:15||Jesus Reyes||LazTarget||=> -|
|2010-10-26 00:15||Jesus Reyes||Note Added: 0042121|
|2010-10-26 00:15||Jesus Reyes||Status||assigned => feedback|
|2010-10-26 00:17||Jesus Reyes||Relationship added||related to 0017552|
|2010-10-26 00:17||Jesus Reyes||Relationship added||related to 0017553|
|2010-11-08 21:35||Jesus Reyes||Status||feedback => resolved|
|2010-11-08 21:35||Jesus Reyes||Fixed in Version||=> 0.9.29 (SVN)|
|2010-11-08 21:35||Jesus Reyes||Resolution||open => won't fix|
|2010-11-08 21:35||Jesus Reyes||Note Added: 0042896|
|2011-12-01 11:25||Marc Weustink||Status||resolved => closed|