コード例 #1
0
        public override void Init(MyObjectBuilder_GuiControlBase objectBuilder)
        {
            base.Init(objectBuilder);

            MyObjectBuilder_GuiControlListbox listboxOb = (MyObjectBuilder_GuiControlListbox)objectBuilder;

            VisibleRowsCount = listboxOb.VisibleRows;
            VisualStyle      = listboxOb.VisualStyle;
        }
コード例 #2
0
        public MyGuiControlListbox(
            Vector2?position = null,
            MyGuiControlListboxStyleEnum visualStyle = MyGuiControlListboxStyleEnum.Default)
            : base(position : position,
                   isActiveControl : true,
                   canHaveFocus : true)
        {
            SetupStyles();
            m_scrollBar = new MyVScrollbar(this);
            m_scrollBar.ValueChanged += verticalScrollBar_ValueChanged;

            Items = new ObservableCollection <Item>();
            Items.CollectionChanged += Items_CollectionChanged;

            VisualStyle = visualStyle;

            Name = "Listbox";

            MultiSelect = true;
        }
コード例 #3
0
 public static StyleDefinition GetVisualStyle(MyGuiControlListboxStyleEnum style)
 {
     return(m_styles[(int)style]);
 }
コード例 #4
0
        public override void Init(MyObjectBuilder_GuiControlBase objectBuilder)
        {
            base.Init(objectBuilder);

            MyObjectBuilder_GuiControlListbox listboxOb = (MyObjectBuilder_GuiControlListbox)objectBuilder;

            VisibleRowsCount = listboxOb.VisibleRows;
            VisualStyle = listboxOb.VisualStyle;
        }
コード例 #5
0
        public MyGuiControlListbox(
            Vector2? position = null,
            MyGuiControlListboxStyleEnum visualStyle = MyGuiControlListboxStyleEnum.Default)
            : base( position: position,
                    isActiveControl: true,
                    canHaveFocus: true)
        {
            SetupStyles();
            m_scrollBar = new MyVScrollbar(this);
            m_scrollBar.ValueChanged += verticalScrollBar_ValueChanged;

            Items = new ObservableCollection<Item>();
            Items.CollectionChanged += Items_CollectionChanged;

            VisualStyle = visualStyle;

            Name = "Listbox";

            MultiSelect = true;
        }
コード例 #6
0
 public static StyleDefinition GetVisualStyle(MyGuiControlListboxStyleEnum style)
 {
     return m_styles[(int)style];
 }