System.Windows.Forms.ToolStripItem.SetBounds C# (CSharp) Method

SetBounds() protected method

protected SetBounds ( Rectangle bounds ) : void
bounds Rectangle
return void
		protected internal virtual void SetBounds (Rectangle bounds)
		{
			if (this.bounds != bounds) {
				this.bounds = bounds;
				OnBoundsChanged ();
			}
		}
		

Usage Example

        protected internal void SetItemLocation(ToolStripItem item, Point location)
        {
            if (item == null)
            {
                throw new ArgumentNullException("item");
            }

            if (item.Owner != this)
            {
                throw new NotSupportedException("The item is not owned by this ToolStrip");
            }

            item.SetBounds(new Rectangle(location, item.Size));
        }
All Usage Examples Of System.Windows.Forms.ToolStripItem::SetBounds