EControl Ltd. Forum Index EControl Ltd.
VCL libraries and software support forum
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Autocomplete StartString

 
Post new topic   Reply to topic    EControl Ltd. Forum Index -> EControl Syntax Editor
View previous topic :: View next topic  
Author Message
jfcarbel



Joined: 13 Jun 2006
Posts: 27

PostPosted: Thu Jun 15, 2006 6:22 am    Post subject: Autocomplete StartString Reply with quote

Posted by: Guest (IP Logged)
Date: March 24, 2006 08:35PM

Is there a way to specify the AutoComplete to start at any character instead of a start string? One way I did this was in the KeyPress event set the StartString to whatever key was pressed but this is painfully slow.
Back to top
View user's profile Send private message
jfcarbel



Joined: 13 Jun 2006
Posts: 27

PostPosted: Thu Jun 15, 2006 6:23 am    Post subject: Reply with quote

Posted by: econtrol (IP Logged)
Date: April 04, 2006 10:39AM

You may run autocompletion manually.

Write OnTextChanged event handler and run autocompletion.

Example:
Code:
procedure TForm1.EditorTextChanged(Sender: TObject; Pos, Count, LineChange: Integer);
begin
  // execution of auto-complete after first char input
  if (Count = 1) and IsLetter(Editor.Lines.Chars[Pos + 1]) and
        (Pos > 0) and not IsWordChar(Editor.Lines.Chars[Pos]) then
    AutoCompletePopup1.Execute;
  end;


Michael.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    EControl Ltd. Forum Index -> EControl Syntax Editor All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group