Пример #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Table"/> class.
        /// </summary>
        /// <param name="parent">Parent control.</param>
        public Table(ControlBase parent, ITableRowFactory rowFactory = null) : base(parent)
        {
            m_ColumnCount = 1;

            m_ColumnWidth = new int[m_ColumnCount];

            m_AutoSizeColumnsToContent = false;
            m_SizeColumnsToContents    = false;

            if (rowFactory == null)
            {
                m_RowFactory = new TableRowFactory(this);
            }
            else
            {
                m_RowFactory = rowFactory;
            }
        }
Пример #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ListBox"/> class.
        /// </summary>
        /// <param name="parent">Parent control.</param>
        public ListBox(ControlBase parent, ITableRowFactory rowFactory = null)
            : base(parent)
        {
            MinimumSize = new Size(16, 16);
            Padding     = Padding.One;

            m_SelectedRows = new List <ListBoxRow>();

            MouseInputEnabled = true;
            EnableScroll(false, true);
            AutoHideBars = true;

            m_Table            = new Table(this);
            m_Table.RowFactory = rowFactory != null ? rowFactory : new ListRowFactory(this);
            m_Table.AutoSizeColumnsToContent = true;
            m_Table.ColumnCount = 1;

            m_MultiSelect = false;
            m_IsToggle    = false;
        }