From fd3816388c13454c06d72d05e0dfec1ed711f638 Mon Sep 17 00:00:00 2001 From: vincents Date: Thu, 9 Aug 2007 20:51:31 +0000 Subject: [PATCH] LCL: FindNextControl returns first control, if the current control is not in the taborder list (fixes #9390) from Gerard Visent git-svn-id: trunk@11765 - --- lcl/include/wincontrol.inc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lcl/include/wincontrol.inc b/lcl/include/wincontrol.inc index e3fbd1ce01..9d5b173f0e 100644 --- a/lcl/include/wincontrol.inc +++ b/lcl/include/wincontrol.inc @@ -2800,7 +2800,12 @@ begin //end; If List.Count > 0 then begin J := List.IndexOf(CurrentControl); - if J<0 then exit; + if J<0 then begin + if GoForward then + J := List.Count - 1 + else + J := 0; + end; //DebugLn('TWinControl.FindNextControl A ',DbgSName(CurrentControl),' ',dbgs(J), // ' GoForward='+dbgs(GoForward)+' CheckTabStop='+dbgs(CheckTabStop)+' CheckParent='+dbgs(CheckParent)); I := J;