mirror of
https://github.com/rmcrackan/Libation.git
synced 2026-10-20 12:45:06 -04:00
Make scrll look more natural when removing items from control
This commit is contained in:
1 parent
8d6d26c9d2
commit
88cbcf6baf
3 files changed
+20
-4
No files matched your search
@@ -190,7 +190,10 @@ namespace LibationWinForms.ProcessQueue
|
||||
vScrollBar1.LargeChange = LargeScrollChange;
|
||||
|
||||
//https://stackoverflow.com/a/2882878/3335599
|
||||
vScrollBar1.Maximum = VirtualHeight + vScrollBar1.LargeChange - 1;
|
||||
int newMaximum = VirtualHeight + vScrollBar1.LargeChange - 1;
|
||||
if (newMaximum < vScrollBar1.Maximum)
|
||||
vScrollBar1.Value = Math.Max(vScrollBar1.Value - (vScrollBar1.Maximum - newMaximum), 0);
|
||||
vScrollBar1.Maximum = newMaximum;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user