Lazarus
Programming => LCL => Topic started by: ermeneuta on June 22, 2018, 07:12:19 pm
-
Good afternoon,
I am in search of a LCL component to implement a mouse-draggable ruler, like that shown in the attached picture. Alternatively, as I have already such a component for the Delphi VCL, how can I recode that VCL component into an LCL component (under Linux).
Thanks
-
Most Win components can be made cross-platform if you remove the units Windows, Messages and replace them by LCLIntf, LCLType, LMessages (sometimes also LCLProc). If there are messages replace the type TWMSomething by TLMSomething (e.g. TWMSize --> TLMSize), and TMessage by TLMessage. The same with the message constants: WM_SOMETHING --> LM_SOMETHING, e.g. WM_SIZE --> LM_SIZE.
A riuler is contained in the JVCL library (https://sourceforge.net/p/lazarus-ccr/svn/HEAD/tree/components/jvcllaz/run/JvCtrls/), not draggable though. But there is also a moveable panel (https://sourceforge.net/p/lazarus-ccr/svn/HEAD/tree/components/jvcllaz/run/JvCtrls/JvMovableBevel.pas)- Maybe you get some ideas about dragging from there.
-
wp,
do you know in which Wiki page can I post your comment? about porting LCL comp.
-
You may start from How To Write Lazarus Component (http://wiki.freepascal.org/How_To_Write_Lazarus_Component) article. May be adding a section with a brief description with a link to main article or something.