Lazarus

Programming => Packages and Libraries => SynEdit => Topic started by: Pascal on September 23, 2015, 12:38:01 pm

Title: How to invoke SyncroEdit from code
Post by: Pascal 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
Title: Re: How to invoke SyncroEdit from code
Post by: Martin_fr 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
Title: Re: How to invoke SyncroEdit from code
Post by: Pascal 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
TinyPortal © 2005-2018