diff --git a/PROMS/Volian.Controls.Library/EditItem.cs b/PROMS/Volian.Controls.Library/EditItem.cs index decec0e1..d4608075 100644 --- a/PROMS/Volian.Controls.Library/EditItem.cs +++ b/PROMS/Volian.Controls.Library/EditItem.cs @@ -734,7 +734,14 @@ namespace Volian.Controls.Library return; } //_MyTimer.ActiveProcess = "SetFocus"; - newFocus.SetFocus(); + + int b4topadjust = newFocus.Top; + newFocus.SetFocus(); //shifts edititem to center it + // need to adjust the TopMostYBefore so that it accounts for any shifting that occurred when the + // SetFocus was called. This fixes B2016-040. + b4topadjust -= newFocus.Top; + TopMostYBefore -= b4topadjust; + //_MyTimer.ActiveProcess = "Dispose"; Dispose(); //_MyTimer.ActiveProcess = "SetAllTabs";