Recent

Author Topic: (SOLVED) TsWorksheetgrid question  (Read 1767 times)

xinyiman

  • Hero Member
  • *****
  • Posts: 2256
    • Lazarus and Free Pascal italian community
(SOLVED) TsWorksheetgrid question
« on: March 18, 2017, 11:27:11 pm »
Hello a question, I have a TsWorksheetgrid I want to populate with data.

Imposed before the quantity of rows and then the columns so

     Self.G_Agenda.ColCount:=5;
     Self.G_Agenda.RowCount:=20;

and thus far the number of columns coincide, but when I go to write in the cell 0,0 as well

Self.G_Agenda.Cells[0,0]:='test';

I come to have many more columns, I think 27

how to solve?

Thank you
« Last Edit: March 19, 2017, 09:33:07 pm by xinyiman »
Win10, Ubuntu and Mac
Lazarus: 2.1.0
FPC: 3.3.1

wp

  • Hero Member
  • *****
  • Posts: 11923
Re: TsWorksheetgrid question
« Reply #1 on: March 19, 2017, 12:09:24 am »
I cannot confirm this. Which version of fpspreadsheet do you use? Version 1.8.1 is the most recent release, and there's trunk, of course. They also give more control over grid redimensioning: if you set AutoExpand to [] then the grid should always keep the same number of columns and rows (http://wiki.lazarus.freepascal.org/TsWorksheetGrid#New_grid_properties)
« Last Edit: March 19, 2017, 12:16:01 am by wp »

xinyiman

  • Hero Member
  • *****
  • Posts: 2256
    • Lazarus and Free Pascal italian community
Re: TsWorksheetgrid question
« Reply #2 on: March 19, 2017, 09:32:51 pm »
I discovered the problem. I do not have to load nell'oncreate form data.
Win10, Ubuntu and Mac
Lazarus: 2.1.0
FPC: 3.3.1

 

TinyPortal © 2005-2018