Lazarus

Programming => Packages and Libraries => FPSpreadsheet => Topic started by: kjteng on July 10, 2018, 10:26:27 am

Title: fpSpread: Hide worksheet
Post by: kjteng on July 10, 2018, 10:26:27 am
I tried to set soHide option however the worksheets are hidden only when I open it in msOffice.   Is there a way to hide worksheet in fpSpread ?
Title: Re: fpSpread: Hide worksheet
Post by: wp on July 10, 2018, 11:26:51 am
In the new svn version the WorkbookTabControl has a new property "ShowAllSheets" which you must set to false in order to hide the "hidden" sheets.
Title: Re: fpSpread: Hide worksheet
Post by: kjteng on July 11, 2018, 12:43:52 pm
Problems with the workbooktabControl and Hidden worksheet:-
 
1.
When a sheet is marked hidden,  worksheetGrid does not hide it immediately.
I have to save the workbook and re-open it in order to see the effect.
what is the correct method to do this ?

2. 
fpspread allows all worksheets to be marked as 'hidden' (In Excel/open office at least one sheet must be visible)
If all worksheets are hidden, the last viewed worksheet would be displayed (with no tab title) in the workbookTabControl when the workbook is opened.
Use demo prgram attached: click [Hide All]->[Save]->[Open]

3.
Use demo, click [Show All]->[Save]->[Open] to unhide all sheets first then
Goto sheet 1, click [Hide current sheet]->[Save]->[Open]
Now the workbooktabControl displays Sheet2, Sheet3 and Sheet4 tabs. However the content of each tab is not correct. example sheet2 tab is showing content of sheet1 etc

Please help.
Title: Re: fpSpread: Hide worksheet
Post by: kjteng on July 12, 2018, 06:55:38 pm
Show and Hide methods (SVN6560) tested. They work fine.
Thanks
Title: Re: fpSpread: Hide worksheet
Post by: wp on July 13, 2018, 02:53:53 pm
Fixed also the problem in the TabControl that the tabindex is no longer equal to the worksheet index if there are hidden worksheets. This had caused problems when tabs of a TabControl showing such a workbook were clicked or renamed.
TinyPortal © 2005-2018