Author Topic: How to hide columns?  (Read 278 times)


  • Full Member
  • ***
  • Posts: 126
How to hide columns?
« 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.


  • Hero Member
  • *****
  • Posts: 8086
Re: How to hide columns?
« Reply #1 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
Mainly Lazarus trunk / fpc 3.2.0 / all 32-bit on Win-10, but many more...


TinyPortal © 2005-2018