Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 160
Default Ribbon, Backstage, getVisible

Hi,

I'm trying to make my first fully working ribbon, but has come across a
problem.

I have the following XML for setting the backstage controls:

<backstage
<button idMso="FileSave"
getVisible="BackStage_GetVisible"/
<button idMso="FileSaveAs"
getVisible="BackStage_GetVisible"/
<button idMso="FileOpen"
getVisible="BackStage_GetVisible"/
<button idMso="FileClose"
getVisible="BackStage_GetVisible"/
<button idMso="ApplicationOptionsDialog"
getVisible="BackStage_GetVisible"/
<button idMso="FileExit"
getVisible="BackStage_GetVisible"/
<tab idMso="TabInfo"
getVisible="BackStage_GetVisible"/
<tab idMso="TabRecent"
getVisible="BackStage_GetVisible"/
<tab idMso="TabNew"
getVisible="BackStage_GetVisible"/
<tab idMso="TabPrint"
getVisible="BackStage_GetVisible"/
<tab idMso="TabShare"
getVisible="BackStage_GetVisible"/
<tab idMso="TabHelp"
getVisible="BackStage_GetVisible"/
<tab idMso="TabPublish"
getVisible="BackStage_GetVisible"/
<tab idMso="TabSave"
getVisible="BackStage_GetVisible"/
<tab idMso="TabOfficeStart"
getVisible="BackStage_GetVisible"/
</backstage

But it is as if the getVisible sub doesn't get executed?!?

All my other <Tab and <Button that uses 'getVisible' works fine, but for
some reason not the ones in 'BackStage'.

Any suggestions?

CE


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,514
Default Ribbon, Backstage, getVisible

Hi,

I'm trying to make my first fully working ribbon, but has come across
a problem.

I have the following XML for setting the backstage controls:

<backstage
<button idMso="FileSave" getVisible="BackStage_GetVisible"/
<button idMso="FileSaveAs" getVisible="BackStage_GetVisible"/
<button idMso="FileOpen" getVisible="BackStage_GetVisible"/
<button idMso="FileClose" getVisible="BackStage_GetVisible"/
<button idMso="ApplicationOptionsDialog"
getVisible="BackStage_GetVisible"/
<button idMso="FileExit" getVisible="BackStage_GetVisible"/
<tab idMso="TabInfo" getVisible="BackStage_GetVisible"/
<tab idMso="TabRecent" getVisible="BackStage_GetVisible"/
<tab idMso="TabNew" getVisible="BackStage_GetVisible"/
<tab idMso="TabPrint" getVisible="BackStage_GetVisible"/
<tab idMso="TabShare" getVisible="BackStage_GetVisible"/
<tab idMso="TabHelp" getVisible="BackStage_GetVisible"/
<tab idMso="TabPublish" getVisible="BackStage_GetVisible"/
<tab idMso="TabSave" getVisible="BackStage_GetVisible"/
<tab idMso="TabOfficeStart"
getVisible="BackStage_GetVisible"/
</backstage

But it is as if the getVisible sub doesn't get executed?!?

All my other <Tab and <Button that uses 'getVisible' works fine,
but for some reason not the ones in 'BackStage'.

Any suggestions?

CE


My understanding is that we can hide the built-in menuitems and replace
them with them our own. I also know we can 'hook' the built-in menus by
assigning our own "onaction" to them. But I haven't seen any examples
anywhere that show we can do to them what we do with custom menuitems
with the 'getvisible' property. I'm sure Ron deBrun can give you a
direct answer, though, if you contact him.

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 160
Default Ribbon, Backstage, getVisible

Hmmmm...

Strange, because it works with all the other builtin tabs and buttons...

But, you're right: If anyone know, it's Ron :-)


CE



"GS" wrote in message ...
Hi,

I'm trying to make my first fully working ribbon, but has come across a
problem.

I have the following XML for setting the backstage controls:

<backstage
<button idMso="FileSave" getVisible="BackStage_GetVisible"/
<button idMso="FileSaveAs" getVisible="BackStage_GetVisible"/
<button idMso="FileOpen" getVisible="BackStage_GetVisible"/
<button idMso="FileClose" getVisible="BackStage_GetVisible"/
<button idMso="ApplicationOptionsDialog"
getVisible="BackStage_GetVisible"/
<button idMso="FileExit" getVisible="BackStage_GetVisible"/
<tab idMso="TabInfo" getVisible="BackStage_GetVisible"/
<tab idMso="TabRecent" getVisible="BackStage_GetVisible"/
<tab idMso="TabNew" getVisible="BackStage_GetVisible"/
<tab idMso="TabPrint" getVisible="BackStage_GetVisible"/
<tab idMso="TabShare" getVisible="BackStage_GetVisible"/
<tab idMso="TabHelp" getVisible="BackStage_GetVisible"/
<tab idMso="TabPublish" getVisible="BackStage_GetVisible"/
<tab idMso="TabSave" getVisible="BackStage_GetVisible"/
<tab idMso="TabOfficeStart" getVisible="BackStage_GetVisible"/
</backstage

But it is as if the getVisible sub doesn't get executed?!?

All my other <Tab and <Button that uses 'getVisible' works fine, but
for some reason not the ones in 'BackStage'.

Any suggestions?

CE


My understanding is that we can hide the built-in menuitems and replace
them with them our own. I also know we can 'hook' the built-in menus by
assigning our own "onaction" to them. But I haven't seen any examples
anywhere that show we can do to them what we do with custom menuitems with
the 'getvisible' property. I'm sure Ron deBrun can give you a direct
answer, though, if you contact him.

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 162
Default Ribbon, Backstage, getVisible


"Charlotte E." wrote in message
...
Hi,

I'm trying to make my first fully working ribbon, but has come across a
problem.

I have the following XML for setting the backstage controls:

<backstage
<button idMso="FileSave" getVisible="BackStage_GetVisible"/
<button idMso="FileSaveAs"

[snip]
</backstage

But it is as if the getVisible sub doesn't get executed?!?

All my other <Tab and <Button that uses 'getVisible' works fine, but for
some reason not the ones in 'BackStage'.

Any suggestions?


It looks like the getVisible callback doesn't exist for the backstage
controls. Tick "show addin user interface errors" (options, advanced,
general) to see the error message when getVisible is attempted. Curious
because getVisible is available for the equivalent controls in the 2007
Office menu.

The backstage has onShow and onHide callbacks available, could hook into
those but not sure how you'd then change visibility of it's controls.

If the objective is to dynamically toggle visibility of the entire backstage
menu I fear it may mean hiding everything and recreating a replica, lot of
work! OTH if you simply want to hide them all set the each with
visibility=false in the xml.

Regards,
Peter T




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,514
Default Ribbon, Backstage, getVisible

Curious because getVisible is available for the equivalent controls
in the 2007 Office menu.


Interesting! I didn't notice this because I only ever 'hook' or
'replace'...

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,514
Default Ribbon, Backstage, getVisible

For clarity...

I did play around with Ron's Ribbon samples in XL2007 a bit some years
back. I've recently reviewed his latest samples after installing v2010,
played around with those and concluded I'd renew interest in using
custom ribbons.

It seems to me that coding for what works in both 2007/2010 just makes
sense and so I opted for 'hooking' existing menuitems and/or
'hide/replace' built-in stuff with my own. This, of course, is with
respect to my 'dictator' apps where the entire Excel UI is modified to
the nth degree specific to what the app requires. In early versions
some user may not even realize they're working in Excel. This is harder
to disguise in the later versions, though, and so the best approach IMO
is to use 'startfromscratch'!

I'm still figuring out how to make ribbon controls 'context sensitive'
in a similar fashion as I've been doing for commandbars/popups. I have
a fairly 'bullit-proof' methodology for this using an events class that
implements a "SetMenuState" system based on passing values in a
delimited string in context to procedures and how they affect a global
glAppMode variable. Fairly complex to say the least but this
methodology works for both VB6 and VBA projects alike.

I won't be happy until I have context-sensitive things working for the
Ribbon with the same reliable consistency. I don't think it'll take
much to get it working if I can get the time/energy I need to move
things forward. Meanwhile, monopolizing the Addins tab along with all
the other UI settings I normally use is working really well for
persisting with using XLAs, and a 'dummy' XLSX for making ribbon
customizations where Excel version is = 12. This relabels the Addins
tab with gsApp_Name and sets it as the only tab visible. The
Home/Backstage tabs are modified as per app requirements!

Since my apps use their own automated instance, this persists my
commandbar/toolbar/popups without issue in all versions with needing
only simple maintenance.

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom Excel backstage [email protected] Excel Programming 0 October 18th 13 08:03 AM
The Ribbon.... Senior Excel Monkey Excel Discussion (Misc queries) 2 June 11th 09 03:37 AM
Ribbon HMT New Users to Excel 4 May 2nd 09 10:15 PM
ribbon Bryce Excel Discussion (Misc queries) 0 February 11th 09 04:56 PM
Can we modify any of the ribbon tabs or create new ribbon tabs? Scott Sornberger New Users to Excel 2 March 19th 08 12:41 PM


All times are GMT +1. The time now is 10:33 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"