Recent

Author Topic: Does TComponentEditor exist in Lazarus  (Read 4572 times)

Andyk

  • Jr. Member
  • **
  • Posts: 72
Does TComponentEditor exist in Lazarus
« on: February 06, 2019, 12:01:10 am »
I/m trying to convert some of my visual components from delphi and have got stuck on the register/property editors.

Is there a lazarus equivalent of TComponentEditor, the lazarus wiki appears to show its the the same as delphi but there is no sign of the designeditors file in the lazarus directory and a search shows no usage of the text "TComponentEditor" in any files in the Lazarus installation source code.

I've added IDEIntf into the require packages, but doesn't help.

Do I have to download some extra files to get these components?

wp

  • Hero Member
  • *****
  • Posts: 11857
Re: Does TComponentEditor exist in Lazarus
« Reply #1 on: February 06, 2019, 12:35:45 am »
You can find TComponentEditor with several specialized descendants in unit componenteditors. Likewise, look at units propedits, graphpropedits for property editors. Note that the details of implementation are different from Delphi. Find some mini-documentation here: http://wiki.freepascal.org/How_To_Write_Lazarus_Component#Integrating_the_component_with_the_IDE. I personally think that the component and property editors are the hardest stuff when converting Delphi components to Lazarus.

Andyk

  • Jr. Member
  • **
  • Posts: 72
Re: Does TComponentEditor exist in Lazarus
« Reply #2 on: February 06, 2019, 10:06:31 am »
Thanks, now I am confused why the directory search failed to find that file. :(

One more question, when I use a separate register file to register all the components in the package, should I check the "Register" check box for every component file in the package or just the registration file?

wp

  • Hero Member
  • *****
  • Posts: 11857
Re: Does TComponentEditor exist in Lazarus
« Reply #3 on: February 06, 2019, 10:33:44 am »
No, the Register checkbox must be active only for those files which really contain a Register procedure. For example, have a look at the package LazDBExport (in components/dbexport): Unit RegDBExport registers all components as well as one property and one component editor, it is the only file of the package for which the option "Register unit" is checked (it has the green arrow in the package treeview icon).

 

TinyPortal © 2005-2018