/// <summary>Creates a new instance of ScrollBar.</summary> /// <param name="toClone">The ScrollBar to clone.</param> public ScrollBar(ScrollBar toClone) : base(toClone) { btnUp = new ButtonText(); btnUp.MouseLeftDown += new EventHandler(btnUp_MouseLeftDown); Controls.Add(btnUp); btnDown = new ButtonText(); btnDown.MouseLeftDown += new EventHandler(btnDown_MouseLeftDown); Controls.Add(btnDown); btnBar = new ButtonMove(); btnBar.MouseDrag += new EventHandler(btnBar_MouseDrag); Controls.Add(btnBar); scroll = 0; range = toClone.range; activeRange = toClone.activeRange; maxScroll = toClone.maxScroll; JumpAmount = toClone.JumpAmount; locSizeChgd(); }
/// <summary>Creates a new instance of ScrollBar</summary> public ScrollBar() : base() { btnUp = new ButtonText(); btnUp.MouseLeftDown += new EventHandler(btnUp_MouseLeftDown); Controls.Add(btnUp); btnDown = new ButtonText(); btnDown.MouseLeftDown += new EventHandler(btnDown_MouseLeftDown); Controls.Add(btnDown); btnBar = new ButtonMove(); btnBar.MouseDrag += new EventHandler(btnBar_MouseDrag); Controls.Add(btnBar); scroll = 0; range = 0; activeRange = 0; maxScroll = 0; JumpAmount = Desktop.DefScrollBarJumpAmount; locSizeChgd(); }