Although you can play with it .. that is easy
It still don't tell how I can use more code to alter the default controls. what methods and events are available. and on and on.
You can't just edit every thing you see unless you are an experienced programmer and can edit the original source on your own
Basically, you can use just as it is by default... I am not a magician, can't learn without a proper teacher or proper documentation.
No pulling a rabbit out of a hat here.
I added instructions on how to add new controls to the JvDesigner demo to the header of the main unit. A hint is in the
JVCL Components wiki page now, too.
Here is the text for simplicity:
{ How to add a new design control type to the demo (example: add a TEdit):
- In the Initialization section register the new class. Add the line
"RegisterClass(TEdit);"
- Add the palette icon of the new class to the ImageList of the demo. You
can find the palette icons of the LCL components in the folder
"images/components" of your Lazarus installation. Select the one without
size appending, e.g. "tedit.png" (not "tedit_150.png") - this demo does
not support the LCL multi-size image list.
- Add a new button to the toolbar. Set its ImageIndex to the index of the
correspondig icon in the image list. Each tool button has a Tag property.
Set the Tag of the new button to the next value - look at the other buttons
to see their Tag values.
- Assign the handler "PaletteButtonClick" to the new button.
- Go to "TMainForm.PaletteButtonClick" and add the name of the new class to
the array "oClasses". Don't forget to increment the upper array index.
Note that the array index is equal to the Tag of the corresponding
button.
}
So, no need to edit original sources. No wizardry, no nothing. I am not the author of these components, I did not even port them. I just looked at the source code. The identifiers usually have speaking names which often make it possible to understand a lot of the functionality without going into detail. I saw the word "RegisterClass" for all the palette controls of the original demo, and immediately understood what I had to do as first step: just by adding any other class to this list of RegisterClass calls will make this class available for the designer. The rest followed automatically from the source code and the (mis-)behavior of the program after my first changes. Never stop thinking!