1
0
mirror of https://github.com/chylex/TweetDuck.git synced 2025-04-22 09:15:48 +02:00

Fix scrollbar in Options not disappearing when switching tabs while animating

This commit is contained in:
chylex 2017-09-04 17:52:01 +02:00
parent ad6240a067
commit 9aedfc2799

View File

@ -128,11 +128,16 @@ private void SelectTab(SettingsTab tab){
tab.Control.OnReady();
}
panelContents.VerticalScroll.Enabled = false; // required to stop animation that would otherwise break everything
panelContents.PerformLayout();
panelContents.SuspendLayout();
panelContents.VerticalScroll.Value = 0; // https://gfycat.com/GrotesqueTastyAstarte
panelContents.Controls.Clear();
panelContents.Controls.Add(tab.Control);
panelContents.ResumeLayout(true);
panelContents.VerticalScroll.Enabled = true;
panelContents.Focus();
currentTab = tab;