View Issue Details

IDProjectCategoryView StatusLast Update
0018590LazarusLCLpublic2015-05-03 21:58
ReporterHans LuijtenAssigned ToBart Broersma 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version0.9.31 (SVN)Product Build 
Target VersionFixed in Version1.2.4 
Summary0018590: TStringGird: Typo in EGridException "FixedRows can't be >= RowCount"
DescriptionI have a TStringGrid with FixedRows=1 and RowCount=1 (set in the ObjectInspector).

In my application I add and remove rows (either by using DeleteRow(Index) or by reducing RowCount), and on occasion the grid becomes empty (with just the fixrow left), which produces the exception:

"Project XYZ raised exception class 'EGridException' with message: FixedRows can't be >= RowCount"

In my case I did screw up my own code, but the exception message is not correct.

Seems that a TStringgrid works just find with FixedRows=1 and RowCount=1 since I can set it just fine in the ObjectInspector.

I suspect it should be "FixedRows can't be > RowCount".

(if there are no rows besides the FixedRows, then RowCount=FixedRows)
Additional InformationMacOS X v10.6.6, XCode 3.2.5
TagsNo tags attached.
Fixed in Revisionr44872
LazTarget-
WidgetsetCarbon
Attached Files

Activities

Zeljan Rikalo

2011-01-23 13:13

developer   ~0045420

AFAIR from kylix, if you have fixed rows then minimum rowcount should be 2.
I don't think that this is bug.

Hans Luijten

2011-01-24 05:00

reporter   ~0045438

You're right :(
Delphi does require Rowcount>FixedRows as well. (I tried it just now in Delphi 2007).

I feel like I'm shooting in my own foot now ...

I really like the fact that I can have FixedRows=RowCount (so that only a header shows). Both in code and in the ObjectInspector I can do this just fine without any error messages.

The point I was trying to make was that the error message doesn't add up with reality :)

The message appeared when I had RowCount < FixedRows. It does NOT appear when RowCount=FixedRows. Though it suggests that the error should appear when RowCount <= FixedRows.

So the message should instead (in my favor) say (wihtou the '=' sign):

"Project XYZ raised exception class 'EGridException' with message: FixedRows can't be > RowCount"

Bart Broersma

2014-05-01 17:39

developer   ~0074732

Message now reflects current behaviour.
If you feel that current behaviour (FixedCols can be ColCount) is wrong then please file a separate bugreport.

Issue History

Date Modified Username Field Change
2011-01-23 06:24 Hans Luijten New Issue
2011-01-23 06:24 Hans Luijten Widgetset => Carbon
2011-01-23 13:13 Zeljan Rikalo LazTarget => -
2011-01-23 13:13 Zeljan Rikalo Note Added: 0045420
2011-01-23 13:13 Zeljan Rikalo Status new => feedback
2011-01-24 05:00 Hans Luijten Note Added: 0045438
2014-05-01 17:39 Bart Broersma Fixed in Revision => r44872
2014-05-01 17:39 Bart Broersma Note Added: 0074732
2014-05-01 17:39 Bart Broersma Status feedback => resolved
2014-05-01 17:39 Bart Broersma Fixed in Version => 1.2.4
2014-05-01 17:39 Bart Broersma Resolution open => fixed
2014-05-01 17:39 Bart Broersma Assigned To => Bart Broersma
2015-05-03 21:58 Hans Luijten Status resolved => closed