added comments

git-svn-id: trunk@16457 -
This commit is contained in:
mattias 2008-09-06 17:10:44 +00:00
parent 3b6072d877
commit 61bf784792
2 changed files with 11 additions and 8 deletions

View File

@ -482,21 +482,24 @@ begin
end;
procedure TCustomComboBox.KeyUp(var Key: Word; Shift: TShiftState);
var iSelStart: Integer;
sCompleteText, sPrefixText, sResultText: string;
var
iSelStart: Integer; // byte position
sCompleteText, sPrefixText, sResultText: string;
begin
inherited KeyUp(Key, Shift);
if ((cbactEnabled in FAutoCompleteText) and (Style <> csDropDownList)) then
begin
//Only happens with alpha-numeric keys and return key and editable Style
if (IsEditableTextKey(Key) or (Key = VK_RETURN) or (ssShift in Shift)) then
begin
begin
if (Key = VK_RETURN) then
SelectAll else
begin
SelectAll
else begin
iSelStart := SelStart;//Capture original cursor position
//End of line completion
if ((iSelStart < Length(Text)) and (cbactEndOfLineComplete in FAutoCompleteText)) then Exit;
if ((iSelStart < Length(Text))
and (cbactEndOfLineComplete in FAutoCompleteText)) then
Exit;
sPrefixText := LeftStr(Text, iSelStart);
sCompleteText := GetCompleteText(Text, iSelStart,
(cbactSearchCaseSensitive in FAutoCompleteText),

View File

@ -378,8 +378,8 @@ type
property Items: TStrings read FItems write SetItems;
property ItemIndex: integer read GetItemIndex write SetItemIndex default -1;
property ReadOnly: Boolean read FReadOnly write SetReadOnly stored IsReadOnlyStored;
property SelLength: integer read GetSelLength write SetSelLength;
property SelStart: integer read GetSelStart write SetSelStart;
property SelLength: integer read GetSelLength write SetSelLength;// byte length
property SelStart: integer read GetSelStart write SetSelStart;// byte position
property SelText: String read GetSelText write SetSelText;
property Style: TComboBoxStyle read FStyle write SetStyle;
property Text;