コード例 #1
0
        public void New(Panel parent, string title)
        {
            XButton button = new XButton(list.Count, parent, title);

            button.RegisterEvent(Click, On, Leave);
            list.Add(button);
        }
コード例 #2
0
        private void On(object sender, EventArgs e)
        {
            XButton t = (XButton)sender;

            if (activeItem != t.ID)
            {
                t.SetStyle(XStyle.On);
            }
        }
コード例 #3
0
        private void Click(object sender, EventArgs e)
        {
            XButton t = (XButton)sender;

            activeItem = t.ID;
            t.SetStyle(XStyle.Active);

            foreach (XButton item in list)
            {
                if (item.ID != t.ID)
                {
                    item.SetStyle(XStyle.None);
                }
            }

            c.SelectedIndex = t.ID;
        }