IRibbon.Elements

Fore Syntax

Elements: IBaseRibbonElements;

Fore.NET Syntax

Elements: Prognoz.Platform.Interop.Forms.IBaseRibbonElements;

Description

The Elements property returns the collection of controls located on all ribbon tabs.

Example

Executing the example requires a form, the Button1 button on this form, and the Ribbon component named Ribbon1.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    Elements: IBaseRibbonElements;
    Element: IBaseRibbonElement;
Begin
    Elements := Ribbon1.Elements;
    For Each Element In Elements Do
        If Element.Category <> Null Then
            Debug.WriteLine(Element.Name + "(" + Element.Category.Name + ")");
        Else
            Debug.WriteLine(Element.Name);
        End If;
    End For;
End Sub Button1OnClick;

On clicking the button the development environment console displays names of all the controls available on the ribbon. Names of parent tabs are also shown for the controls located on the tabs.

See also:

IRibbon