[Lazarus] SynEdit Code Completion

Martin lazarus at mfriebe.de
Sat Jul 20 08:42:15 CEST 2013

On 08/07/2013 21:45, Friedemann Stoffregen wrote:
> Hi everyone.
> Can anyone tell me how I can add a codecompletion (similar to 
> CTRL+Space in Lazarus) to my own application? I had a look at the 
> example / Synedit / Autocomplete demo, but it was not what I was 
> looking for.
> Maybe someone can tell me where I have to look to understand the way 
> Lazarus adds it?

examples\SynEdit\Completion\unit1.pas  does exactly this. It contains 2 
types of completion.

The one you want is:
ctrl-space (which uses SynCompletion1: TSynCompletion )

The completion list must be filled by your code, there is no ready made 
code for this.

And if you want to hide none-matching entries while you type, then you 
need to copy the filter in DoSearchPosition

look at the 2 events assigned in object inspector.

More information about the Lazarus mailing list