ToolStripSplitButton.DefaultItem ToolStripSplitButton.DefaultItem ToolStripSplitButton.DefaultItem ToolStripSplitButton.DefaultItem Property

定义

获取或设置首次选定按钮时 ToolStripSplitButton 的激活部分。Gets or sets the portion of the ToolStripSplitButton that is activated when the control is first selected.

public:
 property System::Windows::Forms::ToolStripItem ^ DefaultItem { System::Windows::Forms::ToolStripItem ^ get(); void set(System::Windows::Forms::ToolStripItem ^ value); };
[System.ComponentModel.Browsable(false)]
public System.Windows.Forms.ToolStripItem DefaultItem { get; set; }
member this.DefaultItem : System.Windows.Forms.ToolStripItem with get, set
Public Property DefaultItem As ToolStripItem

属性值

Forms.ToolStripItem,表示首次选定 ToolStripSplitButton 时的激活部分。A Forms.ToolStripItem representing the portion of the ToolStripSplitButton that is activated when first selected. 默认值为 nullThe default value is null.

注解

ToolStripSplitButton 如果DefaultItem有,则 ENTER 键将激活按钮。If a ToolStripSplitButton has a DefaultItem, the ENTER key activates the button. 否则,ENTER 键将激活下拉。Otherwise, the ENTER key activates the drop-down.

使用属性将所选下拉Click项的事件与按钮上显示的项同步。 DefaultItemUse the DefaultItem property to synchronize the Click event of the chosen drop-down item with the item shown on the button.

适用于