Sie sind hier: MenuSeparator - getTitle
MenuSeparator - getTitle
Übergibt den Text für den Titel eines Menü Separators.
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="Meine Group">
<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">
<menuSeparator id="mySeparator3"/>
<button id="dynaButton" label="Button"
onAction="MyButtonCallbackOnAction"
imageMso="HappyFace"/>
</menu>
</menu>
</menu>
</group>
</tab>
</tabs>
</ribbon>
</customUI>
Funktion in einem Standardmodul:
Sub CallbackGetTitle(control As IRibbonControl, _
ByRef title)
' Callback gibt dem MenuSeparator den Titel
Select Case control.ID
Case "mySeparator2"
title = "Mein Titel"
End Select
End Sub
Sie finden dieses Beispiel auch in der Beispieldatenbank 2

