OSDN Git Service

Even wise log listview scrolling when a new bottle arrives
authornaru <bottle@mikage.to>
Tue, 15 Oct 2002 14:58:04 +0000 (14:58 +0000)
committernaru <bottle@mikage.to>
Tue, 15 Oct 2002 14:58:04 +0000 (14:58 +0000)
bottleclient/LogForm.pas

index 2257ec7..dbdb378 100755 (executable)
@@ -128,7 +128,8 @@ begin
     lvwLog.Selected := lvwLog.Items[Sel + 1];
     lvwLog.Selected.Focused := true;
   end;
-  ListView_Scroll(lvwLog.Handle, 0, High(integer));
+  if not lvwLog.Focused then
+    ListView_Scroll(lvwLog.Handle, 0, High(integer));
   lvwLog.OnChange := lvwLogChange;
 end;
 
@@ -146,7 +147,8 @@ begin
     lvwLog.Selected := lvwLog.Items[Sel + 1];
     lvwLog.Selected.Focused := true;
   end;
-  ListView_Scroll(lvwLog.Handle, 0, High(integer));
+  if not lvwLog.Focused then
+    ListView_Scroll(lvwLog.Handle, 0, High(integer));
   lvwLog.OnChange := lvwLogChange;
 end;