lcl: fix TEdit, TCombobox SelText setter

git-svn-id: trunk@16502 -
This commit is contained in:
paul 2008-09-09 12:29:45 +00:00
parent 69af17812f
commit b8949b9c21
2 changed files with 3 additions and 3 deletions

View File

@ -303,7 +303,7 @@ begin
OldSelStart := SelStart;
NewText := UTF8Copy(OldText, 1, OldSelStart) +
Val +
UTF8Copy(OldText, UTF8Length(OldText) - SelStart - SelLength, MaxInt);
UTF8Copy(OldText, OldSelStart + SelLength + 1, MaxInt);
Text := NewText;
SelStart := OldSelStart;
SelLength := UTF8Length(Val);

View File

@ -113,9 +113,9 @@ var
begin
OldPos := SelStart;
OldText := Text;
NewText := UTF8Copy(OldText, 1, SelStart) +
NewText := UTF8Copy(OldText, 1, OldPos) +
Val +
UTF8Copy(OldText, UTF8Length(OldText) - SelStart - SelLength, MaxInt);
UTF8Copy(OldText, OldPos + SelLength + 1, MaxInt);
Text := NewText;
SelStart := OldPos + UTF8Length(Val);
end;