Backstage Ribbon issues

Scott_Hall

Registered User.
Local time
Today, 12:02
Joined
Mar 27, 2017
Messages
50
Howdy folks!

I’ve been struggling with the backstage portion of my custom ribbon and I can’t seem to make it work. I know that this can be done as I’ve found examples, but for some reason this just won’t layout for me.

The second (hopefully small) issue is that my ribbon pictures do not display. I got the code below straight from Microsoft yet my pictures don’t display. I made copies in BMP, JPG, and PNG. I put them in the database folder and in the \images folder.

My pictures in the \images\ folder display just fine on the standard part of the ribbon, but don’t show up in the backstage.

This is the Microsoft example I’m using: https://msdn.microsoft.com/en-us/li...ckstageView_CreatingThreeTypesofColumnLayouts
Does anyone have an idea why this won’t work for me? No errors are thrown, just no pictures appear and the text is poorly aligned.

I'm trying to get to this:
Backstage.png

Thanks,
Scott


Code:
<backstage>
    <tab idMso="TabInfo" visible="false"/>
    <button idMso="FileSave" visible="false"/>
    <button idMso="SaveObjectAs" visible="false"/>
    <button idMso="FileSaveAsCurrentFileFormat" visible="false"/>
    <button idMso="FileOpen" visible="false"/>
    <button idMso="FileCloseDatabase" visible="false"/>
    <tab idMso="TabRecent" visible="false"/>
    <tab idMso="TabNew" visible="false"/>
    <tab idMso="TabPrint" visible="false"/>
    <tab idMso="TabShare" visible="false"/>
    <tab idMso="TabHelp" visible="false"/>
    <button idMso="ApplicationOptionsDialog" visible="false"/>
    <button idMso="FileExit" visible="false"/>

<tab id="tabImages" label="Info" getTitle="OnGetTitle">
  <firstColumn>
   <group id="reviewersGroup" label="Info Team">
      <topItems>
         <layoutContainer id="headerLayout" layoutChildren="horizontal">
            <labelControl id="spacerLabel" label="               " />
            <labelControl id="nameHeaderLabel" label="       NAME" />
            <labelControl id="roleHeaderLabel" label="       ROLE" />
         </layoutContainer>
         <layoutContainer id="arthurLayout" layoutChildren="horizontal">
            <imageControl id="wrightImage" image="Wright" />
            <labelControl id="arthurNameLabel" label="          Arthur  Wright" />
            <labelControl id="arthurRoleLabel" label="    Sponsor" />
         </layoutContainer>
      </topItems>
</firstColumn>
</group>
</tab>
 
Last edited:
OK, so I got the layout to work properly, but the images still don't show. I have a test database from a couple years ago where I used this XML and it works, images and all. Copied to my current one, and nothing.

Any insights?

Code:
  <backstage>
    <tab idMso="TabInfo" visible="false"/>
    <button idMso="FileSave" visible="false"/>
    <button idMso="SaveObjectAs" visible="false"/>
    <button idMso="FileSaveAsCurrentFileFormat" visible="false"/>
    <button idMso="FileOpen" visible="false"/>
    <button idMso="FileCloseDatabase" visible="false"/>
    <tab idMso="TabRecent" visible="false"/>
    <tab idMso="TabNew" visible="false"/>
    <tab idMso="TabPrint" visible="false"/>
    <tab idMso="TabShare" visible="false"/>
    <tab idMso="TabHelp" visible="false"/>
    <button idMso="ApplicationOptionsDialog" visible="false"/>
    <button idMso="FileExit" visible="false"/>
    
    <tab id="tabImages" label="Info" getTitle="OnGetTitle">

      <firstColumn>
        <group id="grpImages">
          <topItems>
            <!-- Header -->
            <layoutContainer id="lcHeader" layoutChildren="horizontal" expand="neither">
              <labelControl id="lblSpacer" label="                                                                 " noWrap="true"/>
              <labelControl id="lblRole"   label="                   ROLE" noWrap="true"/>
              <labelControl id="lblProfile"   label="                                     CONTACT" noWrap="true"/>
              <labelControl id="lblDetails"   label="                                     DETAILS" noWrap="true"/>
            </layoutContainer>
            
            <!-- Row: 1 -->
            <layoutContainer id="hlc1" layoutChildren="horizontal" expand="neither">
              <imageControl id="img1" image="PERSON.jpg"/>
              <labelControl id="lbl1" label="PERSON            " noWrap="true"/>
              <layoutContainer id="lcRole1" layoutChildren="horizontal">
              <labelControl id="lbl1x" label="Department Manager               " noWrap="true"/>
              <hyperlink id="hlnk4" label="PERSON@" target="mailto:PERSON@?subject=Facilitate"/>
              </layoutContainer>
              <layoutContainer id="lcProfile" layoutChildren="vertical">
              <labelControl id="lbl1w" label="            BA Architecture           " noWrap="true"/>
              <labelControl id="lbl1z" label="            LEED Certified            " noWrap="true"/>
              </layoutContainer>
            </layoutContainer>

            <!-- Row: 2 -->
            <layoutContainer id="hlc2" layoutChildren="horizontal" expand="neither">
              <imageControl id="img2" image="Hall.jpg"/>
              <labelControl id="lbl2" label="Scott Hall                " noWrap="true"/>              
            <layoutContainer id="lcRole2" layoutChildren="vertical">
              <labelControl id="lbl2x" label=" Developer               " noWrap="true"/>
              <labelControl id="lbl2xb" label="Analyst               " noWrap="true"/>
            </layoutContainer>
            <layoutContainer id="lcContact2" layoutChildren="horizontal">
              <labelControl id="spcr2" label="     " noWrap="true"/>
              <hyperlink id="hlnk5" label="sahall@" target="mailto:sahall@?subject=Facilitate"/>
            </layoutContainer>
            <layoutContainer id="lcProfile2" layoutChildren="vertical">
              <labelControl id="lbl2w" label="                  MBA University of Nevada           " noWrap="true"/>
              <labelControl id="lbl2z" label="                  Microsoft SharePoint 2010 Administrator Certified            " noWrap="true"/>
            </layoutContainer>
            </layoutContainer>           

            <!-- Row: 3 -->
            <layoutContainer id="hlc3" layoutChildren="horizontal" expand="neither">
              <imageControl id="img3" image="PERSON.jpg"/>
              <labelControl id="lbl3" label="PERSON      " noWrap="true"/>              
            <layoutContainer id="lcRole3" layoutChildren="vertical">
              <labelControl id="lbl3x" label="Developer          " noWrap="true"/>
              <labelControl id="lbl3xb" label="Liaison          " noWrap="true"/>
            </layoutContainer>
            <layoutContainer id="lcContact3" layoutChildren="horizontal">
              <labelControl id="spcr3" label="             " noWrap="true"/>
              <hyperlink id="hlnk3" label="PERSON@" target="mailto:PERSON@?subject=Facilitate"/>
            </layoutContainer>
            <layoutContainer id="lcProfile3" layoutChildren="vertical">
              <labelControl id="lbl3w" label="        XXXXXXXXXXXX           " noWrap="true"/>
              <labelControl id="lbl3z" label="        XXXXXXXXXXXX            " noWrap="true"/>
              <labelControl id="lbl3c" label="        XXXXXXXXXXXX            " noWrap="true"/>
            </layoutContainer>
            </layoutContainer>           

          </topItems>
        </group>
      </firstColumn>
    </tab>
  </backstage>
 
Have you compared the References between the project that works and the project that doesn't? You can find them in Tools -> References in the Code Window.
 
Yup, no issues with the references that I can find. The issue is that I don't where the images are being sourced from.

For my regular ribbon, there is the subfolder and that is kosher.

In the working copy, I can't find the images anywhere yet they show up. I'm thinking maybe they are in a table as a blob but I can't see them.
 
I've only used idMso images. But I did find the following:

from accessribbon.de (I can't post links) - use a callback function (getImages) to return the image location. I *think* you use getImage="getImages" instead of image="filename"

Code:
Public Sub getImages(control As IRibbonControl, _
                     ByRef image)
' Loads a picture without transparency into the ribbon
' Only valid picture formats must be used (see OH).
  
Set Image = LoadPicture(getAppPath & control.Tag)
  
' or a ImageMso
image = "HappyFace"
  
End Sub

It doesn't make sense because it worked in your other database, I've seen an answer on another site where that (using callback) was the solution.
 
Thanks for the response. I found the issue (sort of).

I created one of files using the software from Accessribbon DE, and created the other one by simply importing basRibbonCallbacks from somewhere else. For some reason the functions in one would not return images at all. I swapped out the module (which had all the same functions) and it started working.

Maybe it was corrupted :rolleyes:
 
Scott, sorry I couldn't help more, but thanks for returning and posting your solution!

It will help others.
 

Users who are viewing this thread

Back
Top Bottom