Triple mouse-click to select entire line of text

If there is something important you think is missing in the current version of ZGameEditor then you can post a feature request here!

Moderator: Moderators

Post Reply
User avatar
Ats
Posts: 708
Joined: Fri Sep 28, 2012 10:05 am
Contact:

Triple mouse-click to select entire line of text

Post by Ats »

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 :?
User avatar
Kjell
Posts: 1910
Joined: Sat Feb 23, 2008 11:15 pm

Re: Triple mouse-click to select entire line of text

Post by Kjell »

Hi Ats,
Ats wrote: Mon Apr 29, 2024 5:32 pmIs it possible to add a triple-click to select an entire paragraph?
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
User avatar
Ats
Posts: 708
Joined: Fri Sep 28, 2012 10:05 am
Contact:

Re: Triple mouse-click to select entire line of text

Post by Ats »

Thanks. So I tried to replace included SynEdit by the new one, but it's not that simple :lol:

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
From there, it's try and repeat... :roll:
  • 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...)
Then I don't know what to do with SynHighlighterZc.pas
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.
User avatar
VilleK
Site Admin
Posts: 2318
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Re: Triple mouse-click to select entire line of text

Post by VilleK »

Ats wrote: Tue Apr 30, 2024 7:38 am Thanks. So I tried to replace included SynEdit by the new one, but it's not that simple :lol:
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.
User avatar
Kjell
Posts: 1910
Joined: Sat Feb 23, 2008 11:15 pm

Re: Triple mouse-click to select entire line of text

Post by Kjell »

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
User avatar
Ats
Posts: 708
Joined: Fri Sep 28, 2012 10:05 am
Contact:

Re: Triple mouse-click to select entire line of text

Post by Ats »

It was just an idea to improve the UX. If it's much more complicated than simply updating an external library, forget about it :lol:
Post Reply