0

I have several pictureboxes added in FlowLayutPanel, There is and index which have a number of picture box im lookin at, i can change this index by buttons. How can i configure my FlowLayoutPanel.VerticalScroll that i could look only at the picture box with name of my index, and i couldnt look at another picture boxes. I suggest that i have to change FlowLayoutPanel.VerticalScroll.Minimum and Maximum, but i can`t, if i change minimum - it countinue to be 0. here is a code:

        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();

How can i do that?

Federico Berasategui
  • 43,562
  • 11
  • 100
  • 154
StewKlimp
  • 49
  • 1
  • 6
  • 1
    I have edited your question title and tags. If you're using winforms please tag your question `[winforms]`, not just `[C#]`. C# is used for a variety of UI frameworks, not only deprecated ones. – Federico Berasategui Nov 15 '13 at 17:57
  • "How can i configure my FlowLayoutPanel.VerticalScroll that i could look only at the picture box with name of my index, and i couldnt look at another picture boxes." Then why have the FlowLayoutPanel() in the first place? Store the images in List or something and only the display the "current" one in a single PictureBox? – Idle_Mind Nov 15 '13 at 18:08
  • No, i have to use FlowLayoutPanel... – StewKlimp Nov 15 '13 at 18:09

0 Answers0