Recent

Author Topic: Is there any "Configuration" component?  (Read 2493 times)

wxinix

  • Newbie
  • Posts: 2
Is there any "Configuration" component?
« on: November 20, 2021, 07:03:51 pm »
I am looking for a component that can provide the "Configuration" options capability, something like Lazarus's own IDE Options dialog.

Is it available?

howardpc

  • Hero Member
  • *****
  • Posts: 4144
Re: Is there any "Configuration" component?
« Reply #1 on: November 20, 2021, 08:10:31 pm »
Short answer: not that I am aware of.
The more complex a GUI drop-in component is, the harder it becomes to make it truly generic and customisable.

A config dialog like the IDE Options in Lazarus synchronises a treeview and pagecontrol, combined with a database engine that saves and restores in XML (but it could be INI or JSON or sqlite etc.)

The principal difficulty with a plug-in component to do this is knowing how to specify the texts, edits, design and layout of each pagecontrol page.

To see how Lazarus does this look in ../lazarus/ide/

The key units involved are IDEOptionDefs, IDEOptionsDlg and IDEOptEditorIntf, though since it is totally customised for the needs of the Lazarus IDE, there are numerous other units required too.

Edson

  • Hero Member
  • *****
  • Posts: 1302
Re: Is there any "Configuration" component?
« Reply #2 on: November 20, 2021, 09:36:01 pm »
I am looking for a component that can provide the "Configuration" options capability, something like Lazarus's own IDE Options dialog.

I wrote a library to make configuration forms: https://github.com/t-edson/MiConfig

It's basically a mechanism to link a control to a variable and to a XML or INI file. Then you can make the read or write in a block of controls.

You just have to create the configuration form, the Pagecontrols (optionally), the Treeview (optionally) or some other combination of controls for a configuration form. Then put the controls, link to variables and to disk. Finally just control the flow disk <-> variables <-> Config form.

I've used it in several of my projects like:
https://github.com/t-edson/Tito-s-Terminal
https://github.com/t-edson/PicPas
https://github.com/t-edson/P65Pas
https://github.com/t-edson/TitoCad
https://github.com/t-edson/CiberPlex

Lazarus 2.2.6 - FPC 3.2.2 - x86_64-win64 on Windows 10

wxinix

  • Newbie
  • Posts: 2
Re: Is there any "Configuration" component?
« Reply #3 on: November 21, 2021, 12:54:06 am »
Thank you.

 

TinyPortal © 2005-2018