using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;

namespace DockableUI
{
    public partial class TabsLayoutPanel : UserControl
    {
        public TabsLayoutPanel()
        {
            InitializeComponent();
            tTag = new List<string>();
            tText = new List<string>();
            tButton = new List<Button>();
            tControl = new List<Control>();
        }

        #region Tabs

        private List<string> tTag;
        private List<string> tText;
        private List<Button> tButton;
        private List<Control> tControl;

        public void Add(string Tag, string Text, DockingForm control)
        {
            tTag.Add(Tag);
            tText.Add(Text);
            Button btn = new Button();
            btn.Text = Text;
            btn.AutoSize = true;
            btn.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
            //btn.Height = 20;
            //btn.Width = 120;
            tButton.Add(btn);
            flowLayoutPanel1.Controls.Add(btn);
            btn.Show();
            tControl.Add(control);
        }

        #endregion
    }

    //[ListBindable(false)]
    //public class TabCollection : System.Windows.Forms.Layout.ArrangedElementCollection, System.Collections.IList, System.Collections.ICollection, System.Collections.IEnumerable
    //{
    //    public TabCollection(Control owner)
    //    {
    //    }
    //}
}
