【问题标题】:Excel CustomUI ribbon layoutExcel CustomUI 功能区布局
【发布时间】:2013-03-20 06:01:14
【问题描述】:

我正在尝试为 excel 创建一个自定义功能区,其中包含如下图所示的组。 (2 行按钮,下方有一个下拉框)。

我开始认为不能完全按照我的意愿去做。

我尝试了几种不同的方法(其中一种如下),但它们都产生相同的输出。 3 列,2x2 按钮,下拉框位于第三列。

有人知道这是否可能吗?

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<customUI onLoad="Ribbon.onLoad" xmlns="http://schemas.microsoft.com/office/2006/01/customui">
   <ribbon>
      <tabs>
         <tab id="toolRibbon" label="redacted">
            <group id="groupDocument" label="Secret Document">
               <box id="z" boxStyle="vertical">
                  <box id="a" boxStyle="horizontal">
                     <box id="aa" boxStyle="vertical">
                        <button id="aaa" label="AAA" />
                        <button id="aab" label="AAB" />
                     </box>
                     <box id="ab" boxStyle="vertical">
                        <button id="aba" label="ABA" />
                        <button id="abb" label="ABB" />
                     </box>
                  </box>
                  <comboBox id="b" label="Looms">
                     <item id="ba" label="BA" />
                     <item id="bb" label="BB" />
                     <item id="bc" label="BC" />
                  </comboBox>
               </box>
            </group>
         </tab>
      </tabs>
   </ribbon>
</customUI>

【问题讨论】:

    标签: excel ribbon


    【解决方案1】:

    在更彻底地查看可用控件后,我发现了buttonGroup,它允许我并排放置按钮。

    现在让它们的尺寸合适..

    <customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
       <ribbon>
          <tabs>
             <tab id="toolRibbon" label="redacted">
                <group id="groupDocument" label="Specia; Document">
                   <buttonGroup id="a">
                      <button id="aa" label="AA"/>
                      <button id="ab" label="AB"/>
                   </buttonGroup>
                   <buttonGroup id="b" >
                      <button id="ba" label="BA"/>
                      <button id="bb" label="BB"/>
                   </buttonGroup>
                   <comboBox id="c" label="Looms">
                      <item id="ca" label="ca"/>
                      <item id="cb" label="cb"/>
                      <item id="cc" label="cc"/>
                   </comboBox>
                </group>
             </tab>
          </tabs>
       </ribbon>
    </customUI>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-09-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-10-23
      • 1970-01-01
      相关资源
      最近更新 更多