Excel CustomUI功能区布局 [英] Excel CustomUI ribbon layout

查看:725
本文介绍了Excel CustomUI功能区布局的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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





我开始认为它不能完全按照我的想法做。


$ b $我尝试过几种不同的方式(其中之一在下面),但都产生相同的输出。 3列,2x2按钮,第三列中的下拉框。



有谁知道这是否可行?

 <?xml version =1.0encoding =UTF-8standalone =yes?> 
< customUI onLoad =Ribbon.onLoadxmlns =http://schemas.microsoft.com/office/2006/01/customui>
< ribbon>
< tabs>
< tab id =toolRibbonlabel =已编辑>
< group id =groupDocumentlabel =秘密文档>
< box id =zboxStyle =vertical>
< box id =aboxStyle =horizo​​ntal>
< box id =aaboxStyle =vertical>
< button id =aaalabel =AAA/>
< button id =aablabel =AAB/>
< / box>
< box id =abboxStyle =vertical>
< button id =abalabel =ABA/>
< button id =abblabel =ABB/>
< / box>
< / box>
< comboBox id =blabel =Looms>
< item id =balabel =BA/>
< item id =bblabel =BB/>
< item id =bclabel =BC/>
< / comboBox>
< / box>
< / group>
< / tab>
< / tabs>
< / ribbon>
< / customUI>


解决方案

更彻底地查看可用的控件后,我发现 buttonGroup 可以让我并排使用按钮。



现在让它们正确的大小..

 < customUI xmlns =http://schemas.microsoft.com/office/2006/01/customui> 
< ribbon>
< tabs>
< tab id =toolRibbonlabel =已编辑>
< group id =groupDocumentlabel =Specia; Document>
< buttonGroup id =a>
< button id =aalabel =AA/>
< button id =ablabel =AB/>
< / buttonGroup>
< buttonGroup id =b>
< button id =balabel =BA/>
< button id =bblabel =BB/>
< / buttonGroup>
< comboBox id =clabel =Looms>
< item id =calabel =ca/>
< item id =cblabel =cb/>
< item id =cclabel =cc/>
< / comboBox>
< / group>
< / tab>
< / tabs>
< / ribbon>
< / customUI>


I'm trying to create a custom ribbon for excel with a group that looks like the image below. (2 rows of buttons with a dropdown box below).

I am beginning to think that it cant be done exactly how I'd like.

I have tried a few different ways (one of which is below) but they all result in the same output. 3 columns, 2x2 buttons with the dropdown box in the third column.

Does anyone know if this is possible?

<?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>

解决方案

After looking through the available controls more thoroughly I found the buttonGroup which allows me to have buttons side-by-side.

Now to make them the right size..

<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>

这篇关于Excel CustomUI功能区布局的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆