StatusStrip.GripStyle 属性

定义

获取或设置用作重新定位控件的手柄的可见性。

public:
 property System::Windows::Forms::ToolStripGripStyle GripStyle { System::Windows::Forms::ToolStripGripStyle get(); void set(System::Windows::Forms::ToolStripGripStyle value); };
public System.Windows.Forms.ToolStripGripStyle GripStyle { get; set; }
member this.GripStyle : System.Windows.Forms.ToolStripGripStyle with get, set
Public Property GripStyle As ToolStripGripStyle

属性值

ToolStripGripStyle 值之一。 默认值为 Hidden

示例

下面的代码示例演示 StatusStrip 了具有各种常见属性集(包括 属性)的 GripStyle

statusStrip1.Dock = System.Windows.Forms.DockStyle.Top;
statusStrip1.GripStyle = System.Windows.Forms.ToolStripGripStyle.Visible;
statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
toolStripStatusLabel1});
statusStrip1.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.HorizontalStackWithOverflow;
statusStrip1.Location = new System.Drawing.Point(0, 0);
statusStrip1.Name = "statusStrip1";
statusStrip1.ShowItemToolTips = true;
statusStrip1.Size = new System.Drawing.Size(292, 22);
statusStrip1.SizingGrip = false;
statusStrip1.Stretch = false;
statusStrip1.TabIndex = 0;
statusStrip1.Text = "statusStrip1";
statusStrip1.Dock = System.Windows.Forms.DockStyle.Top
statusStrip1.GripStyle = System.Windows.Forms.ToolStripGripStyle.Visible
statusStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {toolStripStatusLabel1})
statusStrip1.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.HorizontalStackWithOverflow
statusStrip1.Location = New System.Drawing.Point(0, 0)
statusStrip1.Name = "statusStrip1"
statusStrip1.ShowItemToolTips = True
statusStrip1.Size = New System.Drawing.Size(292, 22)
statusStrip1.SizingGrip = False
statusStrip1.Stretch = False
statusStrip1.TabIndex = 0
statusStrip1.Text = "statusStrip1"

注解

即使 属性 SizingGrip 设置为 true ,属性 GripStyle 设置为 Visible,也不会显示大小调整手柄,除非还将 LayoutStyle 属性设置为溢出值之一。 如果 属性 LayoutStyle 设置为 FlowTable,则不会显示大小调整手柄。

适用于