From 6f343b79e056a453fd932a41394e2ecaedc85310 Mon Sep 17 00:00:00 2001 From: vincents Date: Thu, 6 Aug 2009 12:51:40 +0000 Subject: [PATCH] LCL: maskedit, jump to dot by pressing the key from Ingo Steiniger (issue #14180) git-svn-id: trunk@21118 - --- lcl/maskedit.pp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/lcl/maskedit.pp b/lcl/maskedit.pp index f539864ce4..3009b1e75e 100644 --- a/lcl/maskedit.pp +++ b/lcl/maskedit.pp @@ -1387,6 +1387,25 @@ begin Key := 0; Exit; end; + + // goto a dot + if (Key = VK_OEM_PERIOD) then + begin + FCursorPos := FCursorPos+Pos('.', Copy(Text, (FCursorPos+1), Length(Text)-(FCursorPos+1))); + Key := 0; + SetCursorPos; + Exit; + end; + + // goto a comma + if (Key = VK_OEM_COMMA) then + begin + FCursorPos := FCursorPos+Pos(',', Copy(Text, (FCursorPos+1), Length(Text)-(FCursorPos+1))); + SetCursorPos; + Key := 0; + Exit; + end; + end;