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(); } }
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 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; }