Recent

Author Topic: How to invoke SyncroEdit from code  (Read 1404 times)

Pascal

  • Hero Member
  • *****
  • Posts: 914
How to invoke SyncroEdit from code
« on: September 23, 2015, 12:38:01 pm »
Hello,

how can i invoke SyncroEdit from code?
For example in an TMenuItem.OnClick event.

Regards
Pascal
laz trunk x64 - fpc trunk i386 (cross x64) - Windows 10 Pro x64 (2004)

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 6675
  • Debugger - SynEdit - and more
    • wiki
Re: How to invoke SyncroEdit from code
« Reply #1 on: September 23, 2015, 08:57:51 pm »
look at ide/sourceSynEditor to see HOW to add it to synedit.

then check the key and mouse command handlers in the syncro unit
Code: [Select]
ProcessSynCommand
send the command that you want to be executed.

You can also send it to the synedits command handler function

Pascal

  • Hero Member
  • *****
  • Posts: 914
Re: How to invoke SyncroEdit from code
« Reply #2 on: September 23, 2015, 10:52:00 pm »
Okay, thanks.

I had to subclass as ProcessSynCommand is protected, but works. I implemented an Invoke method to start SyncroEdit mode.

Regards
Pascal
laz trunk x64 - fpc trunk i386 (cross x64) - Windows 10 Pro x64 (2004)

 

TinyPortal © 2005-2018