public override void Init(MyObjectBuilder_GuiControlBase objectBuilder) { base.Init(objectBuilder); MyObjectBuilder_GuiControlListbox listboxOb = (MyObjectBuilder_GuiControlListbox)objectBuilder; VisibleRowsCount = listboxOb.VisibleRows; VisualStyle = listboxOb.VisualStyle; }
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; }
public static StyleDefinition GetVisualStyle(MyGuiControlListboxStyleEnum style) { return(m_styles[(int)style]); }
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; }
public static StyleDefinition GetVisualStyle(MyGuiControlListboxStyleEnum style) { return m_styles[(int)style]; }