RibbonGallery.SelectedItemIndex Property (2007 System)

Gets or sets the index of the currently selected RibbonDropDownItem.

Namespace:  Microsoft.Office.Tools.Ribbon
Assembly:  Microsoft.Office.Tools.Common.v9.0 (in Microsoft.Office.Tools.Common.v9.0.dll)

Syntax

'Declaration
<BrowsableAttribute(False)> _
Public Property SelectedItemIndex As Integer
'Usage
Dim instance As RibbonGallery 
Dim value As Integer 

value = instance.SelectedItemIndex

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

Property Value

Type: System.Int32
The index of the currently selected RibbonDropDownItem.

Remarks

Changing the SelectedItemIndex property changes the value returned by the SelectedItem property. In effect, changing the SelectedItemIndex property changes the selection.

Values assigned to the SelectedItemIndex must be from 0 (zero) through (Items.Count - 1).

If the Items collection is empty, this property returns -1.

.NET Framework Security

See Also

Reference

RibbonGallery Class

RibbonGallery Members

Microsoft.Office.Tools.Ribbon Namespace

Other Resources

Ribbon Object Model Overview