Recent

Author Topic: [DONE] All Things JVDesigner demo  (Read 1508 times)

pixelink

  • Hero Member
  • *****
  • Posts: 1260
[DONE] All Things JVDesigner demo
« on: August 30, 2019, 03:19:07 am »
I ran across a library called JvDesigner on the Compository...
https://sourceforge.net/p/lazarus-ccr/svn/HEAD/tree/components/jvcllaz/examples/JvDesigner/

Its is basically a form designer to make GUI's

Includes laz code/project

Anyone know if there is any documentation for this library?
One doesn't come with it.

« Last Edit: August 30, 2019, 04:53:58 pm by pixelink »
Can't Type - Forgetful - Had Stroke = Forgive this old man!
LAZ 2.2.0 •  VSSTUDIO(.Net) 2022 • Win10 • 16G RAM • Nvida GForce RTX 2060

avra

  • Hero Member
  • *****
  • Posts: 2514
    • Additional info
Re: All Things JVDesigner demo
« Reply #1 on: August 30, 2019, 09:24:15 am »
Anyone know if there is any documentation for this library?
It is JVCL component ported from Delphi. Original didn't have any documentation, and that didn't change much with Lazarus port. I guess everyone thought that demo speaks for it self. Play with it and you'll manage. At the end you might decide to document it in the wiki for the others...

https://wiki.delphi-jedi.org/wiki/JVCL_Help:JVCL_Runtime_Design_Components_Runtime_Package
https://wiki.freepascal.org/JVCL_Components#JvRuntimeDesign
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

pixelink

  • Hero Member
  • *****
  • Posts: 1260
Re: All Things JVDesigner demo
« Reply #2 on: August 30, 2019, 10:02:48 am »
Anyone know if there is any documentation for this library?
It is JVCL component ported from Delphi. Original didn't have any documentation, and that didn't change much with Lazarus port. I guess everyone thought that demo speaks for it self. Play with it and you'll manage. At the end you might decide to document it in the wiki for the others...

https://wiki.delphi-jedi.org/wiki/JVCL_Help:JVCL_Runtime_Design_Components_Runtime_Package
https://wiki.freepascal.org/JVCL_Components#JvRuntimeDesign

Well, thanks for the info. But I already realize I can play with it.

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.
« Last Edit: August 30, 2019, 10:07:00 am by pixelink »
Can't Type - Forgetful - Had Stroke = Forgive this old man!
LAZ 2.2.0 •  VSSTUDIO(.Net) 2022 • Win10 • 16G RAM • Nvida GForce RTX 2060

pixelink

  • Hero Member
  • *****
  • Posts: 1260
Re: All Things JVDesigner demo
« Reply #3 on: August 30, 2019, 04:53:36 pm »
I stumbled across something so much better.
And I can access the controls in the IDe easily

Its called pl_Cindy.
It has a resizer control you plop on a form and all controls cab be resized with handles and moved


Get it at..
https://packages.lazarus-ide.org/
Can't Type - Forgetful - Had Stroke = Forgive this old man!
LAZ 2.2.0 •  VSSTUDIO(.Net) 2022 • Win10 • 16G RAM • Nvida GForce RTX 2060

wp

  • Hero Member
  • *****
  • Posts: 11923
Re: All Things JVDesigner demo
« Reply #4 on: August 30, 2019, 06:08:36 pm »
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:

Quote
{ 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!


 

TinyPortal © 2005-2018