共用方式為


RibbonGallery.SelectedItemIndex 屬性 (2007 系統)

更新:2007 年 11 月

取得或設定目前選取之 RibbonDropDownItem 的索引。

命名空間:  Microsoft.Office.Tools.Ribbon
組件:  Microsoft.Office.Tools.Common.v9.0 (在 Microsoft.Office.Tools.Common.v9.0.dll 中)

語法

<BrowsableAttribute(False)> _
Public Property SelectedItemIndex As Integer

Dim instance As RibbonGallery
Dim value As Integer

value = instance.SelectedItemIndex

instance.SelectedItemIndex = value
[BrowsableAttribute(false)]
public int SelectedItemIndex { get; set; }

屬性值

型別:System.Int32

目前選取之 RibbonDropDownItem 的索引。

備註

變更 SelectedItemIndex 屬性時,會變更 SelectedItem 屬性傳回的值。實際上,變更 SelectedItemIndex 屬性就會變更選取範圍。

指派給 SelectedItemIndex 的值必須介於 0 (零) 到 (Items.Count - 1) 之間。

如果 Items 集合是空的,這個屬性會傳回 -1。

使用權限

請參閱

參考

RibbonGallery 類別

RibbonGallery 成員

Microsoft.Office.Tools.Ribbon 命名空間

其他資源

功能區物件模型概觀