Esempio n. 1
0
        public TabControl(ControlBase parent)
            : base(parent)
        {
            {
                m_DockControl        = new Control.TabControl(this);
                m_DockControl.Margin = Margin.Zero;
                m_DockControl.Width  = 200;
                //m_DockControl.Height = 150;
                m_DockControl.Dock = Dock.Top;

                {
                    Control.Internal.TabButton button = m_DockControl.AddPage("Controls");
                    ControlBase page = button.Page;

                    {
                        Control.GroupBox group = new Control.GroupBox(page);
                        group.Text = "Tab position";
                        Control.RadioButtonGroup radio = new Control.RadioButtonGroup(group);

                        radio.AddOption("Top").Select();
                        radio.AddOption("Bottom");
                        radio.AddOption("Left");
                        radio.AddOption("Right");

                        radio.SelectionChanged += OnDockChange;
                    }
                }

                m_DockControl.AddPage("Red");
                m_DockControl.AddPage("Green");
                m_DockControl.AddPage("Blue");
                m_DockControl.AddPage("Blue");
                m_DockControl.AddPage("Blue");
            }

            {
                Control.TabControl dragMe = new Control.TabControl(this);
                dragMe.Margin = Margin.Five;
                dragMe.Width  = 200;
                dragMe.Dock   = Dock.Top;

                dragMe.AddPage("You");
                dragMe.AddPage("Can");
                dragMe.AddPage("Reorder").SetImage("test16.png");
                dragMe.AddPage("These");
                dragMe.AddPage("Tabs");

                dragMe.AllowReorder = true;
            }
        }
        public TabControl(Base parent)
            : base(parent)
        {
            {
                m_DockControl = new Control.TabControl(this);
                m_DockControl.SetBounds(10, 10, 200, 200);

                {
                    Control.TabButton button = m_DockControl.AddPage("Controls");
                    Base page = button.Page;

                    {
                        Control.RadioButtonGroup radio = new Control.RadioButtonGroup(page)
                        {
                            Text = "Tab position"
                        };
                        radio.SetPosition(10, 10);

                        radio.AddOption("Top").Select();
                        radio.AddOption("Bottom");
                        radio.AddOption("Left");
                        radio.AddOption("Right");

                        radio.SelectionChanged += OnDockChange;
                    }
                }

                m_DockControl.AddPage("Red");
                m_DockControl.AddPage("Green");
                m_DockControl.AddPage("Blue");
            }

            {
                Control.TabControl dragMe = new Control.TabControl(this);
                dragMe.SetBounds(220, 10, 200, 200);

                dragMe.AddPage("You");
                dragMe.AddPage("Can");
                dragMe.AddPage("Reorder").SetImage("test16.png");
                dragMe.AddPage("These");
                dragMe.AddPage("Tabs");

                dragMe.AllowReorder = true;
            }
        }
Esempio n. 3
0
        public TabControl(Base parent)
            : base(parent)
        {
            {
                m_DockControl = new Control.TabControl(this);
                m_DockControl.SetBounds(10, 10, 200, 200);

                {
                    Control.TabButton button = m_DockControl.AddPage("Controls");
                    Base page = button.Page;

                    {
                        Control.RadioButtonGroup radio = new Control.RadioButtonGroup(page);
                        radio.Text = "Tab position";
                        radio.SetPosition(10, 10);

                        radio.AddOption("Top").Select();
                        radio.AddOption("Bottom");
                        radio.AddOption("Left");
                        radio.AddOption("Right");

                        radio.SelectionChanged += OnDockChange;

                    }
                }

                m_DockControl.AddPage("Red");
                m_DockControl.AddPage("Green");
                m_DockControl.AddPage("Blue");
            }

            {
                Control.TabControl dragMe = new Control.TabControl(this);
                dragMe.SetBounds(220, 10, 200, 200);

                dragMe.AddPage("You");
                dragMe.AddPage("Can");
                dragMe.AddPage("Reorder").SetImage("test16.png");
                dragMe.AddPage("These");
                dragMe.AddPage("Tabs");

                dragMe.AllowReorder = true;
            }
        }