/// <summary>
        /// Initializes a new instance of the <see cref="CollapsibleCategory"/> class.
        /// </summary>
        /// <param name="parent">Parent control.</param>
        public CollapsibleCategory(CollapsibleList parent) : base(parent)
        {
            m_HeaderButton          = new CategoryHeaderButton(this);
            m_HeaderButton.Text     = "Category Title"; // [omeg] todo: i18n
            m_HeaderButton.Dock     = Pos.Top;
            m_HeaderButton.Height   = 20;
            m_HeaderButton.Toggled += OnHeaderToggle;

            m_List = parent;

            Padding = new Padding(1, 0, 1, 5);
            SetSize(512, 512);
        }
示例#2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="CollapsibleCategory"/> class.
        /// </summary>
        /// <param name="parent">Parent control.</param>
        public CollapsibleCategory(CollapsibleList parent) : base(parent)
        {
            m_HeaderButton                    = new CategoryHeaderButton(null);
            m_HeaderButton.Text               = "Category Title"; // [omeg] todo: i18n
            m_HeaderButton.Dock               = Dock.Top;
            m_HeaderButton.Toggled           += OnHeaderToggle;
            m_HeaderButton.AutoSizeToContents = true;
            PrivateChildren.Add(m_HeaderButton);
            m_HeaderButton.SendToBack();

            m_List = parent;

            AutoSizeToContents         = true;
            m_Panel.Dock               = Dock.Fill;
            m_Panel.AutoSizeToContents = true;
            this.Dock = Dock.Top;
            Margin    = new Margin(2, 2, 2, 2);
        }