From 983f032d3ffedc6a01c85606959d4a405a98a759 Mon Sep 17 00:00:00 2001 From: Sunny Date: Wed, 17 Jan 2024 17:31:42 +0800 Subject: [PATCH] =?UTF-8?q?*=20UIFlowLayoutPanel:=20=E9=87=8D=E5=86=99Scro?= =?UTF-8?q?llControlIntoView=E5=87=BD=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SunnyUI/Controls/UIFlowLayoutPanel.cs | 6 ++ SunnyUI/Forms/UIForm2.Designer.cs | 39 +++++++++ SunnyUI/Forms/UIForm2.cs | 12 +++ SunnyUI/Forms/UIForm2.resx | 120 ++++++++++++++++++++++++++ 4 files changed, 177 insertions(+) create mode 100644 SunnyUI/Forms/UIForm2.Designer.cs create mode 100644 SunnyUI/Forms/UIForm2.cs create mode 100644 SunnyUI/Forms/UIForm2.resx diff --git a/SunnyUI/Controls/UIFlowLayoutPanel.cs b/SunnyUI/Controls/UIFlowLayoutPanel.cs index 516f27c9..99730ee8 100644 --- a/SunnyUI/Controls/UIFlowLayoutPanel.cs +++ b/SunnyUI/Controls/UIFlowLayoutPanel.cs @@ -29,6 +29,7 @@ * 2023-01-11: V3.3.1 增加AutoScroll属性 * 2023-01-11: V3.3.1 修复只显示水平滚动条时,鼠标滚轮滚动水平滚动条不动的问题 * 2023-11-05: V3.5.2 重构主题 + * 2024-01-17: V3.6.3 重写ScrollControlIntoView函数 ******************************************************************************/ using System; @@ -599,5 +600,10 @@ namespace Sunny.UI HBar.Width = Width - added * 2; } } + + public new void ScrollControlIntoView(Control activeControl) + { + Panel.ScrollControlIntoView(activeControl); + } } } diff --git a/SunnyUI/Forms/UIForm2.Designer.cs b/SunnyUI/Forms/UIForm2.Designer.cs new file mode 100644 index 00000000..3d55dfd6 --- /dev/null +++ b/SunnyUI/Forms/UIForm2.Designer.cs @@ -0,0 +1,39 @@ +namespace Sunny.UI +{ + partial class UIForm2 + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(800, 450); + this.Text = "UIForm2"; + } + + #endregion + } +} \ No newline at end of file diff --git a/SunnyUI/Forms/UIForm2.cs b/SunnyUI/Forms/UIForm2.cs new file mode 100644 index 00000000..64bd3937 --- /dev/null +++ b/SunnyUI/Forms/UIForm2.cs @@ -0,0 +1,12 @@ +using System.Windows.Forms; + +namespace Sunny.UI +{ + public partial class UIForm2 : Form + { + public UIForm2() + { + InitializeComponent(); + } + } +} diff --git a/SunnyUI/Forms/UIForm2.resx b/SunnyUI/Forms/UIForm2.resx new file mode 100644 index 00000000..1af7de15 --- /dev/null +++ b/SunnyUI/Forms/UIForm2.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file