ToolStripItem.Parent ToolStripItem.Parent ToolStripItem.Parent ToolStripItem.Parent Property

定义

获取或设置 ToolStripItem 的父容器。Gets or sets the parent container of the ToolStripItem.

protected public:
 property System::Windows::Forms::ToolStrip ^ Parent { System::Windows::Forms::ToolStrip ^ get(); void set(System::Windows::Forms::ToolStrip ^ value); };
[System.ComponentModel.Browsable(false)]
protected internal System.Windows.Forms.ToolStrip Parent { get; set; }
member this.Parent : System.Windows.Forms.ToolStrip with get, set
Protected Friend Property Parent As ToolStrip

属性值

一个 ToolStrip,它是 ToolStripItem 的父容器。A ToolStrip that is the parent container of the ToolStripItem.

注解

GetCurrentParentParent属性的只读访问器。GetCurrentParent is a read-only accessor to the Parent property. 父级不同于所有者, 因为父对象表示在其中显示项的ToolStrip返回的当前 (可能在溢出区中)。A parent differs from an owner in that a parent denotes the returned current ToolStrip in which the item is displayed, which might be in the overflow area.

父代ToolStrip将引发画图事件等, 而所有者ToolStrip则包含共享数据, 如图像列表。The parent ToolStrip raises paint events and so on, while the owner ToolStrip contains shared data such as image lists. 通常, Parent属性由ToolStrip上的布局管理器设置。Typically, the Parent property is set by the layout manager on the ToolStrip.

适用于