mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-23 20:43:07 +00:00
Add TableLayoutPanel scroll hack
Thanks @poutros !
This commit is contained in:
parent
497bfb9397
commit
ceff3845b7
5 changed files with 10 additions and 5 deletions
|
@ -86,7 +86,7 @@ namespace PKHeX
|
|||
// Box to Tabs D&D
|
||||
dragout.AllowDrop = true;
|
||||
|
||||
FLP_SAVtools.Scroll += Util.FlowLayoutPanelScroll;
|
||||
FLP_SAVtools.Scroll += Util.PanelScroll;
|
||||
|
||||
// Load WC6 folder to legality
|
||||
refreshWC6DB();
|
||||
|
|
|
@ -16,6 +16,8 @@ namespace PKHeX
|
|||
|
||||
// Updating a Control display with autosized elements on every row addition is cpu intensive. Disable layout updates while populating.
|
||||
TLP_Ribbons.SuspendLayout();
|
||||
FLP_Ribbons.Scroll += Util.PanelScroll;
|
||||
TLP_Ribbons.Scroll += Util.PanelScroll;
|
||||
populateRibbons();
|
||||
Util.TranslateInterface(this, Main.curlanguage);
|
||||
TLP_Ribbons.ResumeLayout();
|
||||
|
|
|
@ -16,6 +16,8 @@ namespace PKHeX
|
|||
// Updating a Control display with autosized elements on every row addition is cpu intensive. Disable layout updates while populating.
|
||||
TLP_SuperTrain.SuspendLayout();
|
||||
TLP_DistSuperTrain.SuspendLayout();
|
||||
TLP_SuperTrain.Scroll += Util.PanelScroll;
|
||||
TLP_DistSuperTrain.Scroll += Util.PanelScroll;
|
||||
populateRegimens("SuperTrain", TLP_SuperTrain, reglist);
|
||||
populateRegimens("DistSuperTrain", TLP_DistSuperTrain, distlist);
|
||||
Util.TranslateInterface(this, Main.curlanguage);
|
||||
|
|
|
@ -24,9 +24,10 @@ namespace PKHeX
|
|||
CB_Stats.Items.Add(i.ToString());
|
||||
|
||||
TLP_Flags.SuspendLayout();
|
||||
TLP_Flags.Controls.Clear();
|
||||
|
||||
TLP_Const.SuspendLayout();
|
||||
TLP_Flags.Scroll += Util.PanelScroll;
|
||||
TLP_Const.Scroll += Util.PanelScroll;
|
||||
TLP_Flags.Controls.Clear();
|
||||
TLP_Const.Controls.Clear();
|
||||
addFlagList(getStringList("flags"));
|
||||
addConstList(getStringList("const"));
|
||||
|
|
|
@ -139,9 +139,9 @@ namespace PKHeX
|
|||
return (int)(cb?.SelectedValue ?? 0);
|
||||
}
|
||||
|
||||
public static void FlowLayoutPanelScroll(object sender, ScrollEventArgs e)
|
||||
public static void PanelScroll(object sender, ScrollEventArgs e)
|
||||
{
|
||||
var p = sender as FlowLayoutPanel;
|
||||
var p = sender as Panel;
|
||||
switch (e.ScrollOrientation)
|
||||
{
|
||||
case ScrollOrientation.HorizontalScroll:
|
||||
|
|
Loading…
Reference in a new issue