Recent

Author Topic: PageControl save tabs and reopen  (Read 268 times)

BIT

  • Jr. Member
  • **
  • Posts: 72
PageControl save tabs and reopen
« on: August 07, 2019, 08:34:12 am »
Please tell me how best to save the tabs when closing the program and when opening display them in Nov?


jamie

  • Hero Member
  • *****
  • Posts: 1997
Re: PageControl save tabs and reopen
« Reply #1 on: August 07, 2019, 10:36:14 pm »
You need a configuration file..

Myself I use TiniFile because I have expanded it so now its TIniFileEX  :D

That allows me to save component info easily and strings with any data in it and it stays human readable for easy editing if need be.

 In your Main Form.Create you can read the file contents and use its default parameters to set
the layout of your program.

 In the Form.Destroy you update these values and close the file.

I use a UNIT for each of my applications called "COMMON", with that I included it in all other units.

In the base of that unit, the initialization section I create the inifile class and have all of my constant strings for the Key names in the file as a constant so there is no repeat of strings in the final file.

 there are other choices,  you can use XMLS etc..

 But what you need to do is write out things like TAB indexs, Bound Rectangles , widths, etc..

BIT

  • Jr. Member
  • **
  • Posts: 72
Re: PageControl save tabs and reopen
« Reply #2 on: August 09, 2019, 08:00:22 pm »
Спасибо так и сделал!