public MyGuiControlList(IMyGuiControlsParent parent, Vector2 position, Vector2 size, Vector4 backgroundColor, StringBuilder toolTip, MyTexture2D controlTexture) : base(parent, position, size, backgroundColor, toolTip, controlTexture) { m_realSize = size; m_verticalScrollbar = new MyVScrollbar(this); m_verticalScrollbar.TopBorder = m_verticalScrollbar.RightBorder = m_verticalScrollbar.BottomBorder = false; m_verticalScrollbar.LeftBorder = false; m_verticalScrollbar.OnScrollValueChanged += OnScrollValueChanged; RecalculateScrollbar(); Controls.CollectionChanged += ControlsCollectionChanged; }
public void ScrollbarCreateViewStyle() { tlog.Debug(tag, $"ScrollbarCreateViewStyle START"); var testingTarget = new MyScrollbar(); Assert.IsNotNull(testingTarget, "null handle"); Assert.IsInstanceOf <Scrollbar>(testingTarget, "Should return Scrollbar instance."); try { testingTarget.OnCreateViewStyle(); } catch (Exception e) { tlog.Debug(tag, e.Message.ToString()); Assert.Fail("Caught Exception : Failed!"); } testingTarget.Dispose(); tlog.Debug(tag, $"ScrollbarScrollTo END (OK)"); }