![]() |
Bugfix für VirtualEditTree
Für alle die den VirtualEditTree benutzen, die Unit "VTEditors.pas" enthält einen Bug, welcher ein korrektes Autocomplete beim TComboEditLink verhindert:
Hier die korrigierte Version: (der auskommentierte Teil führte zum Fehler, warum weiß ich auch nicht so genau ^^)
Delphi-Quellcode:
Villeicht bewahrt das ja jemanden anderen vor einer verzweifelten dreistündigen Bugsuche, das Glück hatte ich ja leider nicht :wink: ...
procedure TComboEditLink.DoAutoComplete(var Key: Char);
var S, S1: string; I, St, L: Integer; begin if (FStyle in [csDropDown, csSimple]) and (Key in [#32 .. #255]) then with TComboBox(EditControl) do case FAutoCompleteMode of acComplete: begin St := SelStart; S := Copy(Text, 1, St) + Key; L := Length(S); with FPickList do for I := 0 to Count - 1 do if AnsiSameText(Copy(Strings[I], 1, L), S) then begin S1 := S + Copy(Strings[I], Length(S) + 1, MaxInt); TComboBox(EditControl).Text := S1; SelStart := St;// + 1; SelLength := Length(S1) - St; //Key := #0; Exit; end; end; end; end; viele Grüße phreax |
Alle Zeitangaben in WEZ +1. Es ist jetzt 18:05 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz