LCL, fix SelStart for gtk2 that cause typing in wrong order in stringgrid

git-svn-id: trunk@17788 -
This commit is contained in:
jesus 2008-12-10 21:31:19 +00:00
parent 226434bc52
commit d0c213de66

View File

@ -917,7 +917,11 @@ begin
Exit;
Entry := PGtkEntry(ACustomEdit.Handle);
if GetSelStart(ACustomEdit) = NewStart then exit;
NewPos := Min(NewStart, Entry^.text_max_length);
if Entry^.text_max_length>0 then
NewPos := Min(NewStart, Entry^.text_max_length)
else
NewPos := Min(NewStart, Entry^.text_length);
gtk_entry_set_position(Entry, NewPos);
end;