Hi
I have a relatively ambitious idea for a newcomer. This may not be possible, but I am trying to learn by investigating the limits.
Imagine, I have a folder where my lazarus project is stored. The project has a form with a panel and a richmemo. Additionally, I have defined a class called
textblock with one member called
text of type string.
Every time write something in the richmemo and hit enter, it creates a new instance of
textblock in memory. See picture in attachment with title
Image1.png please.
Now, I want to know if the following is possible; and if so how?
- Add a new file called plugin.pas in the same directory where the main project is. This file will have a control (say a TTrackBar) defined in, with location, anchors, etc. Afterwards, if I recompile using command line, and start the executable file, then the corresponding control (in this example the TTrackBar) will appear in the panel. I understand that the plugin now has to access the main Form, (i know that it is called Form1), the panel, and create a control on top of it. But How do I do that?
- If I now write in the Richmemo and hit enter, the original class textblock will be extended to contain a new variable trackbarvalue of type integer. This variable name and type should also be defines inside plugin.pas . After that, the an instance of the new, extended textblock will be initialized, and the value of the TTrackBar should now be pushed in the class member variable instance of textblock .trackbarvalue . Is this possible? How do I do it?
Thank you