Lazarus

Programming => Packages and Libraries => FPSpreadsheet => Topic started by: Jvan on October 25, 2020, 03:18:43 am

Title: How to hide columns?
Post by: Jvan on October 25, 2020, 03:18:43 am
I only want to show the firt 10 columns, so I need to hide the rest of them.
Title: Re: How to hide columns?
Post by: wp on October 27, 2020, 10:20:17 am
When you want to restrict the number of rows and column usable in the WorksheetGrid you must set the property AutoExpand to [aeDefault] -- then the WorksheetGrid behaves like TStringGrid, i.e. you define the extent of the grid by setting its ColCount and RowCount properties. You cannot navigate beyond these limits, and you only can access cells within these limits. Adding aeData to the set automatically expands the grid when cells are written outside, and adding aeNavigate exands the grid when the user navigates with the arrow keys beyond the limits.

Please read https://wiki.lazarus.freepascal.org/TsWorksheetGrid#New_grid_properties
TinyPortal © 2005-2018