Beispiel #1
0
        public WidgetScrollView(WidgetStyleSheet style)
            : base(style)
        {
            m_contentView        = new WidgetPanel(WidgetManager.DefaultWidgetStyle);
            m_contentView.Parent = this;
            ClipContents         = true;
            m_horizontalScroll   = WidgetScrollType.Normal | WidgetScrollType.Visible | WidgetScrollType.AutoHide;
            m_verticalScroll     = WidgetScrollType.Normal | WidgetScrollType.Visible | WidgetScrollType.AutoHide;

            m_horizontalScrollBar                 = new Widget(WidgetManager.GetStyle("scroll_horizontal"));
            m_horizontalScrollBar.Parent          = this;
            m_horizontalScrollBarIndicator        = new Widget(WidgetManager.GetStyle("scroll_indicator_horizontal"));
            m_horizontalScrollBarIndicator.Parent = this;

            m_verticalScrollBar                 = new Widget(WidgetManager.GetStyle("scroll_vertical"));
            m_verticalScrollBar.Parent          = this;
            m_verticalScrollBarIndicator        = new Widget(WidgetManager.GetStyle("scroll_indicator_vertical"));
            m_verticalScrollBarIndicator.Parent = this;

            m_needLayout = true;
        }
Beispiel #2
0
        public WidgetScrollView(WidgetStyleSheet style = default(WidgetStyleSheet))
            : base(style.IsEmpty ? DefaultStyle : style)
        {
            m_contentView        = new WidgetPanel(WidgetPanel.DefaultStyle);
            m_contentView.Parent = this;
            m_horizontalScroll   = WidgetScrollType.Normal | WidgetScrollType.Visible | WidgetScrollType.AutoHide;
            m_verticalScroll     = WidgetScrollType.Normal | WidgetScrollType.Visible | WidgetScrollType.AutoHide;

            m_horizontalScrollBar        = new WidgetBackground(GetProperty(WidgetParameterIndex.HorizontalScrollStyle, DefaultStyle.Get(WidgetParameterIndex.HorizontalScrollStyle, WidgetBackground.DefaultStyle)));
            m_horizontalScrollBar.Parent = this;

            m_horizontalScrollBarIndicator        = new WidgetBackground(GetProperty(WidgetParameterIndex.HorizontalIndicatorStyle, DefaultStyle.Get(WidgetParameterIndex.HorizontalIndicatorStyle, WidgetBackground.DefaultStyle)));
            m_horizontalScrollBarIndicator.Parent = this;

            m_verticalScrollBar        = new WidgetBackground(GetProperty(WidgetParameterIndex.VerticalcrollStyle, DefaultStyle.Get(WidgetParameterIndex.VerticalcrollStyle, WidgetBackground.DefaultStyle)));
            m_verticalScrollBar.Parent = this;

            m_verticalScrollBarIndicator        = new WidgetBackground(GetProperty(WidgetParameterIndex.VerticalIndicatorStyle, DefaultStyle.Get(WidgetParameterIndex.VerticalIndicatorStyle, WidgetBackground.DefaultStyle)));
            m_verticalScrollBarIndicator.Parent = this;

            ClipContents = true;

            m_needLayout = true;
        }