[Lazarus] Component palette enhancements

Mattias Gaertner nc-gaertnma at netcologne.de
Fri Apr 8 16:33:33 CEST 2022


On Fri, 8 Apr 2022 14:21:23 +0200
Sven Barth via lazarus <lazarus at lists.lazarus-ide.org> wrote:

>[...]
> Solving this would at the same time allow the IDE to have a TButton
> for both the LCL and e.g. Web Components Library. Right now they need
> to be named differently like WebCtrls.TWButton.

Note that if you just want to support two TButton, then you don't need
to extend Classes. You can use TReader.OnFindComponentClass.
Only if you want two different TButton on the same form you need the
unitname.tbutton.

I will try to summarize:

a) Extend lfm to support unitname.classname and extend IDE to allow
registering classnames twice.

Pro: Allows two TButton in the same app, even on the same form.

Con: Require changes in Classes (FPC release)

Con: old and new lfm file troubles (old/new FPC, old/new IDE)


b) Extend IDE with environment tags for pages and allow registering
classnames twice for different environments.

Pro: IDE could show context sensitive component palette

Pro: allows two TButton in IDE

Con: does not support two TButton in one app, unless app sets
TReader.OnFindComponentClass

Con: troubles with old IDE


Note that a) and b) are not xor - both can be implemented.

Mattias


More information about the lazarus mailing list