private void Bar_ValueChanged(object sender, EventArgs e) { if (edit != null) { ScrollBarInfo.SetScrollValue(edit.Handle, bar.Value); } }
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(); } }
private void SetBarPosition() { Bar.Left = Width - ScrollBarInfo.VerticalScrollBarWidth() - 2; Bar.Top = 0; Bar.Width = ScrollBarInfo.VerticalScrollBarWidth() + 1; Bar.Height = Height; Bar.BringToFront(); }
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); }
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); }
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; }
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; }
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(); }