getDescription

 

Description

Gibt die Beschreibung für ein Ribbon Control zurück.

















Beispiel XML Ribbon Datei:

<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui"
               onLoad="CallbackOnLoad">
    <ribbon startFromScratch="false">
        <tabs>
            <tab id="MyTab" label="Button Demo">
                <group id="MyGroup" label="Button Demo">
                    <labelControl id="myLabel1" label="Beispiel:" />
                    <labelControl id="myLabel2" label="Menüs" />
                        <menu id="MyMenu" label="Beispiel Menu"
                          itemSize="normal">
                            <menuSeparator id="Myseparator1"/>
                            <menu id="MyMenuNextLevel1" label="Erweitert"
                              itemSize="normal">
                                <button idMso="Cut"/>
                                <button idMso="Copy"/>
                                <button idMso="Paste"/>
                                <menuSeparator id="mySeparator2" 
                                  getTitle="CallbackGetTitle"/>
                                    <menu id="MyMenuNextLevel2" 
                                      label="Große Einträge" 
                                      itemSize="large">
                                        <button id="MyBtn1a" 
                                            getDescription="CallbackGetDescription"/>
                                        <button id= "MyBtn2a" 
                                          getDescription="CallbackGetDescription"/>
                                        <menuSeparator id="mySeparator3"/>
                                        <dynamicMenu id="MyDynamicMenu" 
                                          label="Sub Menu"
                                          getContent="CallbackGetContent"/>
                                        <button id="dynaButton" label="Button" 
                                          onAction="MyButtonCallbackOnAction" 
                                          imageMso="HappyFace"/>
                                    </menu>
                            </menu>
                     </menu>
                </group>
            </tab>
        </tabs>
    </ribbon>
</customUI>  

Funktion in einem Standardmodul:

Sub CallbackGetDescription(control As IRibbonControl, _
                           ByRef description)
    ' Liefert dem Control die Beschreibung
    Select Case control.ID
        Case "MyBtn1a"
            description = "Hallo ich bin eine Beschreibung"
        Case "MyBtn2a"
            description = "Ich bin auch eine Beschreibung"
    End Select
End Sub



Sie finden dieses Beispiel auch in der Beispieldatenbank 2

 

 





Zurück