Exemplo n.º 1
0
        //gives the control a list of settings to manage
        public SettingsCtl(SettingCollection settings)
        {
            this.settings = settings;
            SettingSubCtl sub;

            foreach (Setting s in settings)
            {
                sub = new SettingSubCtl(s);
                Controls.Add(sub);
            }
        }
Exemplo n.º 2
0
        protected override void OnLayout(LayoutEventArgs e)
        {
            int y = 0;

            foreach (Control c in Controls)
            {
                SettingSubCtl sub = c as SettingSubCtl;
                if (sub != null)
                {
                    sub.Location = new Point(0, y);
                    sub.Width    = ClientSize.Width;

                    y += sub.Height;
                }
            }

            base.OnLayout(e);
        }