我有一个使用FlowLayoutPanel并带有很多自定义UserControls的应用程序。自定义用户控件包含一个标签。
问题:更新Label后,FlowLayoutPanel会自动将其滚动到视图中(类似于FlowLayoutPanel.ScrollControlIntoView()函数)。
这是使FlowLayoutPanel滚动的代码片段:
private void DownloadChanged(Object sender, DownloadProgressChangedEventArgs e)
{
progressDownload.Value = e.ProgressPercentage;
lblDownloaded.Text = e.BytesReceived.ToString() + " / " + e.TotalBytesToReceive.ToString();
}
Run Code Online (Sandbox Code Playgroud)
我一直试图在FlowLayoutPanel中找到一个事件,当孩子更新时,我可以拦截该事件并阻止其滚动,但到目前为止我还没有任何运气。
是否有可能做到这一点?如果是,我将如何处理?谢谢!
如何将整数列表转换为二维数组呢?
List<int> integerList = new List<int>();
integerList.Add(1);
integerList.Add(2);
...
integerList.Add(250000);
int[,] integerArray = new int[500,500];
//fill integerArray with integerList values here
Run Code Online (Sandbox Code Playgroud)
目标输出应该是行,从0到499填充x然后将y递增1并重复.integerArray [X,Y]