Exemple #1
0
        public ScrollableControl()
        {
            SetStyle(ControlStyles.ContainerControl, true);
            SetStyle(ControlStyles.AllPaintingInWmPaint, false);

            auto_scroll           = false;
            force_hscroll_visible = false;
            force_vscroll_visible = false;
            auto_scroll_margin    = new Size(0, 0);
            auto_scroll_min_size  = new Size(0, 0);
            scroll_position       = new Point(0, 0);
            dock_padding          = new DockPaddingEdges(this);
            SizeChanged          += new EventHandler(Recalculate);
            VisibleChanged       += new EventHandler(VisibleChangedHandler);
            LocationChanged      += new EventHandler(LocationChangedHandler);
            ParentChanged        += new EventHandler(ParentChangedHandler);
            HandleCreated        += new EventHandler(AddScrollbars);

            CreateScrollbars();

#if NET_2_0
            horizontalScroll = new HScrollProperties(this);
            verticalScroll   = new VScrollProperties(this);
#endif
        }
Exemple #2
0
 // Normally DockPadding is created lazyly, as observed in the test cases, but some children
 // may need to have it always.
 internal void CreateDockPadding()
 {
     if (dock_padding == null)
     {
         dock_padding = new DockPaddingEdges(this);
     }
 }
Exemple #3
0
            public override bool Equals(object other)
            {
                DockPaddingEdges otherEdge = other as DockPaddingEdges;

                if (otherEdge == null)
                {
                    return(false);
                }
                return(otherEdge.all == all && otherEdge.top == top && otherEdge.left == left && otherEdge.bottom == bottom && otherEdge.right == right);
            }
Exemple #4
0
            object ICloneable.Clone()
            {
                DockPaddingEdges dockPaddingEdges = new DockPaddingEdges(owner);

                dockPaddingEdges.all    = all;
                dockPaddingEdges.top    = top;
                dockPaddingEdges.right  = right;
                dockPaddingEdges.bottom = bottom;
                dockPaddingEdges.left   = left;
                return(dockPaddingEdges);
            }
Exemple #5
0
            object ICloneable.Clone()
            {
                DockPaddingEdges padding_edge;

                padding_edge = new DockPaddingEdges(owner);

                padding_edge.all    = all;
                padding_edge.left   = left;
                padding_edge.right  = right;
                padding_edge.top    = top;
                padding_edge.bottom = bottom;

                return(padding_edge);
            }
Exemple #6
0
		// Normally DockPadding is created lazyly, as observed in the test cases, but some children
		// may need to have it always.
		internal void CreateDockPadding ()
		{
			if (dock_padding == null)
				dock_padding = new DockPaddingEdges (this);
		}
			object ICloneable.Clone() {
				DockPaddingEdges padding_edge;

				padding_edge=new DockPaddingEdges(owner);

				padding_edge.all=all;
				padding_edge.left=left;
				padding_edge.right=right;
				padding_edge.top=top;
				padding_edge.bottom=bottom;

				return padding_edge;
			}
		public ScrollableControl() {
			SetStyle(ControlStyles.ContainerControl, true);
			SetStyle(ControlStyles.AllPaintingInWmPaint, false);

			auto_scroll = false;
			force_hscroll_visible = false;
			force_vscroll_visible = false;
			auto_scroll_margin = new Size(0, 0);
			auto_scroll_min_size = new Size(0, 0);
			scroll_position = new Point(0, 0);
			dock_padding = new DockPaddingEdges(this);
			SizeChanged +=new EventHandler(Recalculate);
			VisibleChanged += new EventHandler (VisibleChangedHandler);
			LocationChanged += new EventHandler (LocationChangedHandler);
			ParentChanged += new EventHandler (ParentChangedHandler);
			HandleCreated += new EventHandler (AddScrollbars);

			CreateScrollbars ();
			
#if NET_2_0
			horizontalScroll = new HScrollProperties (this);
			verticalScroll = new VScrollProperties (this);
#endif
		}
		object ICloneable.Clone()
		{
			DockPaddingEdges dockPaddingEdges = new DockPaddingEdges(owner);
			dockPaddingEdges.all = all;
			dockPaddingEdges.top = top;
			dockPaddingEdges.right = right;
			dockPaddingEdges.bottom = bottom;
			dockPaddingEdges.left = left;
			return dockPaddingEdges;
		}