操作FlowLayoutPanel滚动

时间:2013-11-15 17:55:26

标签: c# winforms flowlayoutpanel

我在FlowLayutPanel中添加了几个图片框,有一些图片框我想看的索引,我可以用按钮改变这个索引。 我如何配置我的FlowLayoutPanel.VerticalScroll,我只能看看我的索引名称的图片框,我无法看到另一个图片框。 我建议我必须更改FlowLayoutPanel.VerticalScroll.Minimum和Maximum,但我不能,如果我改变最小值 - 它计数为0.这里是一个代码:

        flowLayoutPanel1.Dock = DockStyle.Fill;
        flowLayoutPanel1.FlowDirection = FlowDirection.TopDown;
        flowLayoutPanel1.Controls.Add(pictureBox3);
        flowLayoutPanel1.Controls.Add(pictureBox2);
        flowLayoutPanel1.Controls.Add(pictureBox1);
        flowLayoutPanel1.Controls.Add(pictureBox4);
        flowLayoutPanel1.AutoScroll = true;
        flowLayoutPanel1.WrapContents = false;
        MessageBox.Show( flowLayoutPanel1.VerticalScroll.Maximum.ToString());
        this.flowLayoutPanel1.VerticalScroll.Minimum = 300;
        MessageBox.Show(flowLayoutPanel1.VerticalScroll.Minimum.ToString());
        flowLayoutPanel1.PerformLayout();

我该怎么做?

0 个答案:

没有答案