Backstage (looking for a reference book)

hatman

Well-known Member
Joined
Apr 8, 2005
Messages
2,664
In order to do hardcore ribbon building/manipulation, I use RibbonX by Martin, Puls and Hennig as my bible. I was somewhat disappointed that they did not come out with a 2010 edition, though I can uderstand as the changes from 2007 to 2010 are not extensive. However, the notable exception is the new Backstage object... anyone have advice on a good (read "exhaustively detailed") resource?
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Thanx Andy. I JUST found this in the last hour or so, and it's a wealth of information... so far has filled in teh deatails I was lookign for. Thnk you!!
 
Yes, Ron's article is excellent... probably the best one of it's type for a global view of things that can be changed and how to accomplish it. However, as with any article of that type, it's a starting point only. While I used it extensively, I also found that it really only hit the tip of the iceberg. I found this MSDN article expanded on several concepts and introduced several controls that Ron't article didn't touch upon.

At this point, I have pretty much completed the task that I set out to accomplish. In all o fthese artciles, there was really only one effect I couldn't figure out, and that is something that looks like a command button, but has (2) lines of text. Specifically, I am building a recently used file list for a dictator application that uses a custom file type. Building and managing teh list is pretty straight-forward, as well as the mechanics of making it work properly. But I wanted it to look more like what user's have come to expect of the native list. If you look closely, each file is presented on it's own button, with a "large" image, and (2) lines for the label. At this point in my research, I am assuming that this is a control object that is not exposed in the XML schema (it looks like a Task or a TaskGroup, but not quite). I have come up with an appearance that is acceptable to me, using the label property of a group object to present the filename, and then the label property of the button inside that group to present the full file/pathname.

For completeness, I'll post some short code snippets, in the event that someone has advice to improve it. Thanks for the advice and responses so far...

XML:
Rich (BB code):
 <tab id="BackStage_Tab"label="Recent Files">
<firstColumn> 
<group id="Group_1"getLabel="CallBack_Recent_File_Name"> 
<topItems> 
<layoutContainer id="layout1"layoutChildren="vertical">
<button id="Recent_1"
getLabel="CallBack_Recent_Label"
onAction="CallBack_Recent"
getVisible="CallBack_Recent_Visible"
imageMso="FileOpen" 
isDefinitive="true" />
</< font>layoutContainer> 
</< font>topItems> 
</< font>group> 
<group id="Group_3"getLabel="CallBack_Recent_File_Name"> 
<topItems> 
<layoutContainer id="layout3"layoutChildren="vertical">
<button id="Recent_3"
getLabel="CallBack_Recent_Label"
onAction="CallBack_Recent"
getVisible="CallBack_Recent_Visible"
imageMso="FileOpen" 
isDefinitive="true" />
</< font>layoutContainer> 
</< font>topItems> 
</< font>group> 
<group id="Group_2"getLabel="CallBack_Recent_File_Name"> 
<topItems> 
<layoutContainer id="layout2"layoutChildren="vertical">
<button id="Recent_2"
getLabel="CallBack_Recent_Label"
onAction="CallBack_Recent"
getVisible="CallBack_Recent_Visible"
imageMso="FileOpen" 
isDefinitive="true" />
</< font>layoutContainer> 
</< font>topItems> 
</< font>group> 
<group id="Group_4"getLabel="CallBack_Recent_File_Name"> 
<topItems> 
<layoutContainer id="layout4"layoutChildren="vertical">
<button id="Recent_4"
getLabel="CallBack_Recent_Label"
onAction="CallBack_Recent"
getVisible="CallBack_Recent_Visible"
imageMso="FileOpen" 
isDefinitive="true" />
</< font>layoutContainer> 
</< font>topItems> 
</< font>group> 
<group id="Group_5"getLabel="CallBack_Recent_File_Name"> 
<topItems> 
<layoutContainer id="layout5"layoutChildren="vertical">
<button id="Recent_5"
getLabel="CallBack_Recent_Label"
onAction="CallBack_Recent"
getVisible="CallBack_Recent_Visible"
imageMso="FileOpen" 
isDefinitive="true" />
</< font>layoutContainer> 
</< font>topItems> 
</< font>group> 
<group id="Group_6"getLabel="CallBack_Recent_File_Name"> 
<topItems> 
<layoutContainer id="layout6"layoutChildren="vertical">
<button id="Recent_6"
getLabel="CallBack_Recent_Label"
onAction="CallBack_Recent"
getVisible="CallBack_Recent_Visible"
imageMso="FileOpen" 
isDefinitive="true" />
</< font>layoutContainer> 
</< font>topItems> 
</< font>group> 
 
<group id="Group_7"getLabel="CallBack_Recent_File_Name"> 
<topItems> 
<layoutContainer id="layout7"layoutChildren="vertical">
<button id="Recent_7"
getLabel="CallBack_Recent_Label"
onAction="CallBack_Recent"
getVisible="CallBack_Recent_Visible"
imageMso="FileOpen" 
isDefinitive="true" />
</< font>layoutContainer> 
</< font>topItems> 
</< font>group> 
<group id="Group_8"getLabel="CallBack_Recent_File_Name"> 
<topItems> 
<layoutContainer id="layout8"layoutChildren="vertical">
<button id="Recent_8"
getLabel="CallBack_Recent_Label"
onAction="CallBack_Recent"
getVisible="CallBack_Recent_Visible"
imageMso="FileOpen" 
isDefinitive="true" />
</< font>layoutContainer> 
</< font>topItems> 
</< font>group> 
<group id="Group_9"getLabel="CallBack_Recent_File_Name"> 
<topItems> 
<layoutContainer id="layout9"layoutChildren="vertical">
<button id="Recent_9"
getLabel="CallBack_Recent_Label"
onAction="CallBack_Recent"
getVisible="CallBack_Recent_Visible"
imageMso="FileOpen" 
isDefinitive="true" />
</< font>layoutContainer> 
</< font>topItems> 
</< font>group> 
 
</< font>firstColumn> 
</< font>tab> 
</< font>backstage>

And Cal
lbacks for the Labels and Visibility:
Rich (BB code):
'Callback for getLabel
Sub CallBack_Recent_File_Name(control As IRibbonControl, ByRef returnedVal)
    
    Dim Recent_File_Name As String
    Dim Recent_File_Path_Name As String
    Dim slash_place As Integer
    
    Recent_File_Path_Name = GetSetting(App_Name, Sect_1, Right(control.ID, Len(control.ID) - Len("Group_")), "")
    
    slash_place = InStrRev(Recent_File_Path_Name, "\")
    
    Recent_File_Name = Right(Recent_File_Path_Name, Len(Recent_File_Path_Name) - slash_place)
    
    returnedVal = Recent_File_Name
End Sub
'Callback for  getLabel
Sub CallBack_Recent_Label(control As IRibbonControl, ByRef returnedVal)
   Dim Recent_File_Name
    
    Recent_File_Name = GetSetting(App_Name, Sect_1, Right(control.ID, Len(control.ID) - Len(Recent_File_Base_Text)), "")
    
    returnedVal = Recent_File_Name
End Sub
'Callback for getVisible
Sub CallBack_Recent_Visible(control As IRibbonControl, ByRef returnedVal)
   Dim Recent_File_Name
    
    Recent_File_Name = GetSetting(App_Name, Sect_1, Right(control.ID, Len(control.ID) - Len(Recent_File_Base_Text)), "")
    
    If Recent_File_Name = "" Then
    
        returnedVal = False
        
    Else
    
        returnedVal = True
        
    End If
    
End Sub
 
That was also my assessment, however, from what I can see, a Task doesn't have an onAction property... it's a container for other stuff... unless I am missing something?
 

Forum statistics

Threads
1,223,742
Messages
6,174,243
Members
452,553
Latest member
red83

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top