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

SetPlacement() private method

private SetPlacement ( ToolStripItemPlacement placement ) : void
placement ToolStripItemPlacement
return void
		internal virtual void SetPlacement (ToolStripItemPlacement placement)
		{
			this.placement = placement;
		}

Usage Example

 protected override void SetDisplayedItems()
 {
     if (this.state[stateCalledSpringTableLayout])
     {
         if (base.Orientation == Orientation.Horizontal)
         {
             RightToLeft rightToLeft = this.RightToLeft;
         }
         Point location = this.DisplayRectangle.Location;
         location.X += base.ClientSize.Width + 1;
         location.Y += base.ClientSize.Height + 1;
         bool          flag  = false;
         Rectangle     empty = Rectangle.Empty;
         ToolStripItem item  = null;
         for (int i = 0; i < this.Items.Count; i++)
         {
             ToolStripItem item2 = this.Items[i];
             if (flag || ((IArrangedElement)item2).ParticipatesInLayout)
             {
                 if (flag || (this.SizingGrip && item2.Bounds.IntersectsWith(this.SizeGripBounds)))
                 {
                     base.SetItemLocation(item2, location);
                     item2.SetPlacement(ToolStripItemPlacement.None);
                 }
             }
             else if ((item != null) && empty.IntersectsWith(item2.Bounds))
             {
                 base.SetItemLocation(item2, location);
                 item2.SetPlacement(ToolStripItemPlacement.None);
             }
             else if (item2.Bounds.Width == 1)
             {
                 ToolStripStatusLabel label = item2 as ToolStripStatusLabel;
                 if ((label != null) && label.Spring)
                 {
                     base.SetItemLocation(item2, location);
                     item2.SetPlacement(ToolStripItemPlacement.None);
                 }
             }
             if (item2.Bounds.Location != location)
             {
                 item  = item2;
                 empty = item.Bounds;
             }
             else if (((IArrangedElement)item2).ParticipatesInLayout)
             {
                 flag = true;
             }
         }
     }
     base.SetDisplayedItems();
 }
All Usage Examples Of System.Windows.Forms.ToolStripItem::SetPlacement