Recent

Author Topic: Reordering worksheets  (Read 1360 times)

Zoran

  • Hero Member
  • *****
  • Posts: 1824
    • http://wiki.lazarus.freepascal.org/User:Zoran
Reordering worksheets
« on: June 09, 2019, 10:52:47 pm »
Hello,

How can I programmatically move a worksheet to another position within a workbook?

I can't find any move method, or setting worksheet index, or similar; is there any way to reorder worksheets?

wp

  • Hero Member
  • *****
  • Posts: 11830
Re: Reordering worksheets
« Reply #1 on: June 10, 2019, 01:17:11 am »
In the new revision, TsWorksheet has a property Index which you can set to its new position in the workbook. Notification of the visual controls should work, i.e. the tabs of the TabControl will rearrange accordingly.

Zoran

  • Hero Member
  • *****
  • Posts: 1824
    • http://wiki.lazarus.freepascal.org/User:Zoran
Re: Reordering worksheets
« Reply #2 on: June 11, 2019, 11:06:07 am »
It doesn't matter if a feature had existed or not before the question, when a library's maintainer is Werner.
It is enough to ask if some feature exists, you get the positive answer!
 :)

Thank you very much!

 

TinyPortal © 2005-2018