[SOLVED] Grid colcount vs columns.count lazarus / 31-LCL ---------------------------------------------------------------------- BigChimp · 2012-08-28 14:18 I've edited the wiki grids article to be more clear on the difference between colcount and columns.count: http://wiki.lazarus.freepascal.org/Grids_Reference_Page#property_Colum ns However, I think the descriptions must surely be reversed: having Columns.Count represent the number of custom Columns seems to make sense; ColCount presumably only contains the count of normal columns. Could a Lazarus/grids guru confirm/correct this if necessary? Thanks, BigChimp ---------------------------------------------------------------------- ludob · 2012-08-28 14:42 AFAIK when using columns TCustomGrid.ColCount = TCustomGrid.FixedCols + TCustomGrid.Columns.Count ---------------------------------------------------------------------- BigChimp · 2012-08-28 14:47 From the article - some selective quoting: QuoteLazarus include the property '''columns''' [..] used to add custom columns. Custom columns are fixed column objects that '''replace''' the standard non-fixed grid columns. So there are the following types of column: - normal columns: non-fixed - grid.columns:a sort of fixed column object that is custom - grid.fixedcols: presumably some other kind of fixed column Does this seem about right? ---------------------------------------------------------------------- Blaazen · 2012-08-28 14:53 QuoteSo there are the following types of column: - normal columns: non-fixed - grid.columns:a sort of fixed column object that is custom - grid.fixedcols: presumably some other kind of fixed column Does this seem about right? Yes, but they are never all three at the same time. You can have fixed+normal columns OR fixed + grid.columns ---------------------------------------------------------------------- ludob · 2012-08-28 15:01 The easiest representation is: - fixed cols: cols that can not be scrolled - scrollable cols:     - managed by TCustomGrid: number of cols=colcount - fixedcols     - managed by user with columns: number of cols = columns.count ---------------------------------------------------------------------- BigChimp · 2012-08-28 15:05 Thanks guys... pls feel free to update the wiki if you want to. Edit: actually: could you please have a look and correct where necessary? Thanks. The depiction of tcustomgrid.column as a "fixed column object" is a bit misleading then... it is a fixed object that represents a column but can be scrollable ---------------------------------------------------------------------- jesusr · 2012-08-28 19:50 I modified the text, please check and comment if anything should be changed. ---------------------------------------------------------------------- BigChimp · 2012-08-29 06:56 Thanks Jesus, at first glance that looks very clear!