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 

TAutoCompletePopup

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



Joined: 21 Jul 2006
Posts: 67
Location: North Carolina, USA

PostPosted: Wed Jul 26, 2006 4:13 pm    Post subject: TAutoCompletePopup Reply with quote

Is there a way to have the auto complete popup cancel or have it not show when there is nothing to show? For instance, in the OnGetAutoCompleteList event handler, I have nothing to put in there yet a blank popup box is displayed anyway. I tried adding an Abort call if the list was empty, but that doesn't seem to work properly as the auto complete popup is still polling for items every time delay is encountered even though I have not moved the cursor or modified the editor contents.

Thanks.
Back to top
View user's profile Send private message
econtrol
Site Admin


Joined: 09 Jun 2006
Posts: 202

PostPosted: Wed Jul 26, 2006 8:13 pm    Post subject: Reply with quote

Make next fixing (ecPopupCtrl.pas):

Code:
function TAutoCompletePopup.ShowAutoComplete: Boolean;
var idx_list, stl_i, stl_di, tmp: TecStringList;
    i, k: integer;
begin
  FIntItems.Assign(FItems);
  FIntDispItems.Assign(FDisplayItems);
  if Assigned(FOnGetAutoCompleteList) then
     FOnGetAutoCompleteList(Self, FStart, FIntItems, FIntDispItems);
  if FIntItems.Count = 0 then Exit; // <== fixing
...


Michael.
Back to top
View user's profile Send private message Send e-mail
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