Access开发培训
网站公告
·Access专家课堂QQ群号:151711184    ·Access快速开发平台下载地址及教程    ·欢迎加入Access专家课堂微信群!    ·如何快速搜索本站文章|示例|资料    
您的位置: 首页 > 技术文章 > Access数据库-窗体/数据页

驯服Backstage

时 间:2011-07-01 20:38:16
作 者:小魏   ID:2173  城市:青浦
摘 要:Backstage;Ribbon
正 文:

Backstage是OFFICE2010里出来的代替原来的OFFICE菜单的.而之前写的Ribbon代码这时可能会变成了加载项.而Backstage会显示一些我们不想被显示的重要内容.如<个人信息选项>等.

找了网上的所有资料,发现所有的经验都是针对2007的.关于Backstage的资料却少见.

以下是本人的Ribbon代码,其中 <backstage></backstage>的内容可供大家参考.

<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui"
    loadImage="CallBackLoadImage"
    onLoad="MyRibbonLoad" >
 <!-- 关闭所有功能区,以便于重新定义 -->
 <ribbon startFromScratch="true">
  <!-- 自定义快速启动区 -->
  <qat>
   <sharedControls>
    <control idQ="Undo" />
    <control idQ="Redo" />
    <control idQ="RecordsRefreshRecords" />
    <!-- 显示关闭打印预览 -->
    <control idQ="PrintPreviewClose" />
    <!-- 显示总计 -->
    <control idQ="RecordsTotals" />
    <!-- 新的分组 -->
    <!-- <control idQ="sep1" /> -->
    <control idQ="Cut"/>
    <control idQ="Copy"  />
    <control idQ="Paste" />
    <!-- 新的分组,导出到EXCEL,刷新所有数据 -->
    <!-- <separator idQ="sep2" /> -->
    <control idQ="ExportExcel"  />
    <control idQ="DataRefreshAll" />
    <!-- 查找,升续,降续 -->
    <control idQ="FindDialog" />
    <control idQ="SortUp" />
    <control idQ="SortDown" />
    <control idQ="FilePrintPreview" />
    <!-- 显示加载项 -->
    <control idQ="GroupAddInsCustomToolbars" />
   </sharedControls>
  </qat>
  <tabs>
   <!-- 创建新的功能区 -->
   <tab id="Home" label="管理系统开始菜单">
    <group idQ="GroupClipboard" />
    <group idQ="GroupTextFormatting" />
    <group idQ="GroupRichText" />
    <group idQ="GroupRecords" />
    <group idQ="GroupClipboard" />
    <group idQ="GroupFindAccess" />
    <group idQ="GroupSortAndFilter" />

    <!-- 创建新的组 -->
    <group id="group1" label="Basic Button Attributes Examples">
     <button id="button1" label="Buttion1"
         size="large"
         getEnabled="MyEnable"
         getVisible="MyVisible"
         image="CokeClassic.png"
         onAction="=Bt1()"
         supertip= "In this example, we load a custom image without ability to change image at runtime"
                     />
     <button id="button2" label="button2"
         size="large"
         getEnabled="MyEnable"
         getVisible="MyVisible"
         image="CokeZero.png"
         onAction="=Bt2()"
                    />
     <button id="button3"
         size="large"
         getLabel="MyLabel"
         getEnabled="MyEnable"
         getVisible="MyVisible"
         imageMso="EquationMatrixGallery"
         onAction="=Bt3()"
         supertip= "In this example, we set an MSO office image from the built in icons"
                    />
    </group>
   </tab>
   <tab id="gongnenqu" label="功能区">
    <group id="loadFormsGroup1" label="Load Forms1">
    </group>
    <group id="loadFormsGroup2" label="Load Forms2">
     <button id="loadForm2Button" label="Load Form2" onAction="HandleOnAction" tag="Form2" />
     <button id="loadForm1Button" label="Load Form1" onAction="HandleOnAction" tag="Form1"/>
     <button id="WZWUnderline"
        label="Protect All Table"
        size="normal"
        getImage="MyImage"
        tag="happy.png"
        supertip= "ldsjfdjsljfldsjfldsjfl"
                   />

    </group>
   </tab>
   <tab id="wzwOICQ" label="在线人员">
   </tab>
  </tabs>

 </ribbon>

 <backstage>
  <tab id="testArea" label="Sample Scenarios" columnWidthPercent="30" insertAfterMso="TabInfo" visible="true" >
   <firstColumn>
    <group id="grpTwo" label="Group Two" visible="true" >
     <primaryItem>
      <menu id="menuOne" label="DropDown Menu">
       <menuGroup id="menuGrpOne" >
        <button id="btnOne"  label="Button one" />
        <button id="btnTwo" label="Button two" />
        <checkBox id="chkBoxOne" label="Sample Check Box" />
       </menuGroup>
      </menu>
     </primaryItem>
     <topItems>
      <imageControl id="imgControlOne" imageMso="BlogHomePage"/>
      <groupBox id="grpBox" label="Group Box with Check Boxes and Radio Group">
       <checkBox id="chkBox1" label="A Check Box" />
       <checkBox id="chkBox2" label="Disabled Check Box" enabled="false" />
       <radioGroup id="rdoGrp" label="Nested Radio Group" >
        <radioButton id="firstRadioBtn" label="1st Radio Button"/>
        <radioButton id="secondRadioBtn" label="2nd Radio Button"/>
       </radioGroup>
      </groupBox>
     </topItems>
    </group>
   </firstColumn>
  </tab>
  <button idQ="ApplicationOptionsDialog" visible="false"/>
  <button idQ="FileExit" visible="false"/>
 </backstage>
</customUI>



Access软件网QQ交流群 (群号:54525238)       Access源码网店

常见问答:

技术分类:

相关资源:

专栏作家

关于我们 | 服务条款 | 在线投稿 | 友情链接 | 网站统计 | 网站帮助