Ejemplo n.º 1
0
 private void Bar_ValueChanged(object sender, EventArgs e)
 {
     if (edit != null)
     {
         ScrollBarInfo.SetScrollValue(edit.Handle, bar.Value);
     }
 }
Ejemplo n.º 2
0
        private void SetBarPosition()
        {
            if (ShowRect)
            {
                VBar.Left   = Width - ScrollBarInfo.VerticalScrollBarWidth() - 2;
                VBar.Top    = 1;
                VBar.Width  = ScrollBarInfo.VerticalScrollBarWidth() + 1;
                VBar.Height = Height - 2;
                VBar.BringToFront();

                HBar.Left   = 2;
                HBar.Height = ScrollBarInfo.HorizontalScrollBarHeight() + 1;
                HBar.Width  = Width - (VBar.Visible ? VBar.Width : 0) - 2;
                HBar.Top    = Height - HBar.Height - 2;
                HBar.BringToFront();
            }
            else
            {
                VBar.Left   = Width - ScrollBarInfo.VerticalScrollBarWidth() - 1;
                VBar.Top    = 0;
                VBar.Width  = ScrollBarInfo.VerticalScrollBarWidth() + 1;
                VBar.Height = Height;
                VBar.BringToFront();

                HBar.Left   = 0;
                HBar.Height = ScrollBarInfo.HorizontalScrollBarHeight() + 1;
                HBar.Width  = Width - (VBar.Visible ? VBar.Width : 0);
                HBar.Top    = Height - HBar.Height;
                HBar.BringToFront();
            }
        }
Ejemplo n.º 3
0
 private void SetBarPosition()
 {
     Bar.Left   = Width - ScrollBarInfo.VerticalScrollBarWidth() - 2;
     Bar.Top    = 0;
     Bar.Width  = ScrollBarInfo.VerticalScrollBarWidth() + 1;
     Bar.Height = Height;
     Bar.BringToFront();
 }
Ejemplo n.º 4
0
        public UIHorScrollBarEx()
        {
            ShowText = false;
            ShowRect = false;
            Height   = ScrollBarInfo.HorizontalScrollBarHeight() + 1;

            fillColor      = UIColor.LightBlue;
            foreColor      = UIColor.Blue;
            fillHoverColor = Color.FromArgb(111, 168, 255);
            fillPressColor = Color.FromArgb(74, 131, 229);
        }
Ejemplo n.º 5
0
        public UIVerScrollBarEx()
        {
            ShowText = false;
            ShowRect = false;
            Width    = ScrollBarInfo.VerticalScrollBarWidth() + 1;

            fillColor      = UIColor.LightBlue;
            foreColor      = UIColor.Blue;
            fillHoverColor = Color.FromArgb(111, 168, 255);
            fillPressColor = Color.FromArgb(74, 131, 229);
        }
Ejemplo n.º 6
0
        public UIHorScrollBarEx()
        {
            SetStyleFlags(true, false);
            ShowText = false;
            ShowRect = false;
            Height   = ScrollBarInfo.HorizontalScrollBarHeight() + 1;

            fillColor      = UIStyles.Blue.ScrollBarFillColor;
            foreColor      = UIStyles.Blue.ScrollBarForeColor;
            fillHoverColor = UIStyles.Blue.ScrollBarFillHoverColor;
            fillPressColor = UIStyles.Blue.ScrollBarFillPressColor;
        }
Ejemplo n.º 7
0
        public UIVerScrollBarEx()
        {
            SetStyleFlags(true, false);
            ShowText = false;
            ShowRect = false;
            Width    = ScrollBarInfo.VerticalScrollBarWidth() + 1;

            fillColor      = UIStyles.Blue.ScrollBarFillColor;
            foreColor      = UIStyles.Blue.ScrollBarForeColor;
            fillHoverColor = UIStyles.Blue.ScrollBarFillHoverColor;
            fillPressColor = UIStyles.Blue.ScrollBarFillPressColor;
        }
Ejemplo n.º 8
0
        private void OnMouseWheel(object sender, MouseEventArgs e)
        {
            base.OnMouseWheel(e);
            if (bar != null && bar.Visible && edit != null)
            {
                var si = ScrollBarInfo.GetInfo(edit.Handle);
                if (e.Delta > 10)
                {
                    if (si.nPos > 0)
                    {
                        ScrollBarInfo.ScrollUp(edit.Handle);
                    }
                }
                else if (e.Delta < -10)
                {
                    if (si.nPos < si.ScrollMax)
                    {
                        ScrollBarInfo.ScrollDown(edit.Handle);
                    }
                }
            }

            SetScrollInfo();
        }