0

I am trying to create a selectable scroll wheel where the selected child object in a FlowLayoutPanel is increased in size.

How can I increase the size of an object inside the FlowLayoutPanel after it is created dynamically?

class CustomFlowLayout : FlowLayoutPanel
{

    public List<Node> ChildList = new List<Node>();
    Node SelectedNode = new Node();

    public CustomFlowLayout(){ }

    //
    //Methods
    //
    public void DrawList()
    { 
        if (this.ChildList.Count == 0)
        {
            MessageBox.Show("No Systems found");                
        }
        else
        {
            SelectedNode = ChildList[0];
            for (int i = 0; i < ChildList.Count; i++)
            {
                PictureBox CurrentPic = new PictureBox();
                CurrentPic.Name = ChildList[i].Name;
                CurrentPic.Width = 400;
                CurrentPic.Height = 200;            
                CurrentPic.Image = ChildList[i].NodePicture;
                this.Controls.Add(CurrentPic);
            }                                                                      
        }//end else
    }//end DrawList()
}//end Class

Node class

namespace Nostalgia{
class Node 
{
    public bool isSelected = false;
    public string Name;
    public Bitmap NodePicture;
    public int ListPosition;
    //
    //Constructors
    //
    public Node() { }
}
Rodrigo Taboada
  • 2,727
  • 4
  • 24
  • 27
SmokeBeer
  • 1
  • 1
  • [Here](https://wpfcarousel.codeplex.com/) - You'd better not waste time reinventing the wheel. Simply use an `ElementHost` and call it a day. – Federico Berasategui Jan 30 '15 at 20:21
  • I thank you for that I checked it out and it looks really useful. I am, however, looking to learn how the wheel was invented. I am trying to teach myself how to do this kind of stuff and was just looking for some guidance on structure, .NET elements and the such. I want to know how to do it for myself – SmokeBeer Jan 30 '15 at 22:32

0 Answers0