使用出色的Office RibbonX编辑器,我在Word中为功能区创建了一个自定义选项卡。我使用了这样的代码来添加现有的命令:
<button idMso="FileSave" />
<button idMso="FileSaveAs" />
<button idMso="Bold" />
前两个图标根据需要显示,并且工作正常。但是"粗体"按钮不会出现,图标和标签都不会出现。我确定这种情况只发生在切换按钮上,如"项目符号"或"上标"。
切换按钮的正确术语是
<toggleButton
如以下xml所示,在我使原始不可见后,它重建了Word中的段落选项卡
<!-- Recreate the portions of the Paragraph tab that we actually need -->
<group
id="Home.Paragraphs"
label="Paragraph"
getVisible="RibbonCallbacksForVisibility.getVisible"
insertBeforeMso="GroupEditing">
<box
id="Home.Paragraph.Status"
boxStyle="horizontal">
<buttonGroup
id="Home.Paragraph.Alignment">
<toggleButton idMso="AlignLeft"/>
<toggleButton idMso="AlignCenter"/>
<toggleButton idMso="AlignRight"/>
<toggleButton idMso="AlignJustify"/>
</buttonGroup>
<buttonGroup
id="Home.Paragraph.Marks"
visible="true">
<toggleButton idMso="ParagraphMarks"/>
</buttonGroup>
</box>
<box
id="ParagraphIndent"
boxStyle="horizontal">
<button idMso="IndentDecreaseWord"/>
<button idMso="IndentIncreaseWord"/>
</box>
<box
id = "ParagraphOther"
boxStyle="horizontal">
<gallery idMso="LineSpacingGallery"/>
<button idMso="SortDialogClassic"/>
</box>
<dialogBoxLauncher>
<button idMso="ParagraphDialog"/>
</dialogBoxLauncher>
</group>