The double-click to select an entire word is already implemented. Is it possible to add a triple-click to select an entire paragraph? I'm not sure if this requires custom programming or if it's an option in the ZDesigner project settings. I'll take a look at the source code.
In the meantime, we can click anywhere in the code editor and type at this position. So I'm not sure if there are real newlines to ensure a proper selection of a paragraph
Triple mouse-click to select entire line of text
Moderator: Moderators
Re: Triple mouse-click to select entire line of text
Hi Ats,
Article: https://blogs.embarcadero.com/syntax-hi ... n-windows/
Code: https://github.com/pyscripter/SynEdit-2 ... .pas#L2027
K
The regular TSynEdit control doesn't support this ( which is what ZGameEditor uses ) .. but apparently it was added to TSynEdit-2 in 2020.
Article: https://blogs.embarcadero.com/syntax-hi ... n-windows/
Code: https://github.com/pyscripter/SynEdit-2 ... .pas#L2027
K
Re: Triple mouse-click to select entire line of text
Thanks. So I tried to replace included SynEdit by the new one, but it's not that simple
Here's what I did:
I tried moving it to C:\Users\User\Documents\Embarcadero\Studio\23.0\CatalogRepository\SynEdit-12\Source
But the compiler isn't happy. So I started replacing SynHighlighterZc in ZEditor source files by another one (like SynHighlighterST), just to try out.
But afterward I get an error from frmXmlEdit.pas, line 46: SynEdit.MaxScrollWidth := 4096;
And I can't comment it out, as I get a lot of new errors. So I stopped there.
Here's what I did:
- Install Delphi RADStudio
- Download ZGameEditor: https://github.com/VilleKrumlinde/zgameeditor
- Fix drive letter in the project: ZDesigner.dproj line 67: <DCC_DcuOutput>t:\temp\zge</DCC_DcuOutput>[/*]
- Delete files in zgameeditor-master\tools\ZDesigner\3rdparty thar are starting with the name Syn.
WARNING: SynHighlighterZc.pas is a custom file, keep it! - Install last version of SynEdit:
Last depot for SynEdit: https://github.com/TurboPack/SynEdit
Install SynEdit using: Delphi / Tools / Getit Package Manager / Search SynEdit
- Compiler can't find Highlighters files... So I copied files from
C:\Users\User\Documents\Embarcadero\Studio\23.0\CatalogRepository\SynEdit-12\Source\Highlighters
to
C:\Users\User\Documents\Embarcadero\Studio\23.0\CatalogRepository\SynEdit-12\Source
(But there has to be another way...)
I tried moving it to C:\Users\User\Documents\Embarcadero\Studio\23.0\CatalogRepository\SynEdit-12\Source
But the compiler isn't happy. So I started replacing SynHighlighterZc in ZEditor source files by another one (like SynHighlighterST), just to try out.
But afterward I get an error from frmXmlEdit.pas, line 46: SynEdit.MaxScrollWidth := 4096;
And I can't comment it out, as I get a lot of new errors. So I stopped there.
Last edited by Ats on Tue Apr 30, 2024 7:35 pm, edited 1 time in total.
Re: Triple mouse-click to select entire line of text
It seems that dialects of TSynEdit diverged into several different directions that are not compatible with existing projects. I had similar issues in the Mac branch of ZGE and I don't think I got the highlighter working there either.
Re: Triple mouse-click to select entire line of text
Hi guys,
It might be easier to see how TSynEdit-2 has implemented triple-click and only add that .. instead of swapping to the entire fork.
K
It might be easier to see how TSynEdit-2 has implemented triple-click and only add that .. instead of swapping to the entire fork.
K
Re: Triple mouse-click to select entire line of text
It was just an idea to improve the UX. If it's much more complicated than simply updating an external library, forget about it