mirror of
https://github.com/kwsch/PKHeX
synced 2025-02-17 13:58:33 +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
|
// Box to Tabs D&D
|
||||||
dragout.AllowDrop = true;
|
dragout.AllowDrop = true;
|
||||||
|
|
||||||
FLP_SAVtools.Scroll += Util.FlowLayoutPanelScroll;
|
FLP_SAVtools.Scroll += Util.PanelScroll;
|
||||||
|
|
||||||
// Load WC6 folder to legality
|
// Load WC6 folder to legality
|
||||||
refreshWC6DB();
|
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.
|
// Updating a Control display with autosized elements on every row addition is cpu intensive. Disable layout updates while populating.
|
||||||
TLP_Ribbons.SuspendLayout();
|
TLP_Ribbons.SuspendLayout();
|
||||||
|
FLP_Ribbons.Scroll += Util.PanelScroll;
|
||||||
|
TLP_Ribbons.Scroll += Util.PanelScroll;
|
||||||
populateRibbons();
|
populateRibbons();
|
||||||
Util.TranslateInterface(this, Main.curlanguage);
|
Util.TranslateInterface(this, Main.curlanguage);
|
||||||
TLP_Ribbons.ResumeLayout();
|
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.
|
// Updating a Control display with autosized elements on every row addition is cpu intensive. Disable layout updates while populating.
|
||||||
TLP_SuperTrain.SuspendLayout();
|
TLP_SuperTrain.SuspendLayout();
|
||||||
TLP_DistSuperTrain.SuspendLayout();
|
TLP_DistSuperTrain.SuspendLayout();
|
||||||
|
TLP_SuperTrain.Scroll += Util.PanelScroll;
|
||||||
|
TLP_DistSuperTrain.Scroll += Util.PanelScroll;
|
||||||
populateRegimens("SuperTrain", TLP_SuperTrain, reglist);
|
populateRegimens("SuperTrain", TLP_SuperTrain, reglist);
|
||||||
populateRegimens("DistSuperTrain", TLP_DistSuperTrain, distlist);
|
populateRegimens("DistSuperTrain", TLP_DistSuperTrain, distlist);
|
||||||
Util.TranslateInterface(this, Main.curlanguage);
|
Util.TranslateInterface(this, Main.curlanguage);
|
||||||
|
|
|
@ -24,9 +24,10 @@ namespace PKHeX
|
||||||
CB_Stats.Items.Add(i.ToString());
|
CB_Stats.Items.Add(i.ToString());
|
||||||
|
|
||||||
TLP_Flags.SuspendLayout();
|
TLP_Flags.SuspendLayout();
|
||||||
TLP_Flags.Controls.Clear();
|
|
||||||
|
|
||||||
TLP_Const.SuspendLayout();
|
TLP_Const.SuspendLayout();
|
||||||
|
TLP_Flags.Scroll += Util.PanelScroll;
|
||||||
|
TLP_Const.Scroll += Util.PanelScroll;
|
||||||
|
TLP_Flags.Controls.Clear();
|
||||||
TLP_Const.Controls.Clear();
|
TLP_Const.Controls.Clear();
|
||||||
addFlagList(getStringList("flags"));
|
addFlagList(getStringList("flags"));
|
||||||
addConstList(getStringList("const"));
|
addConstList(getStringList("const"));
|
||||||
|
|
|
@ -139,9 +139,9 @@ namespace PKHeX
|
||||||
return (int)(cb?.SelectedValue ?? 0);
|
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)
|
switch (e.ScrollOrientation)
|
||||||
{
|
{
|
||||||
case ScrollOrientation.HorizontalScroll:
|
case ScrollOrientation.HorizontalScroll:
|
||||||
|
|
Loading…
Add table
Reference in a new issue