How can I tell if my Ribbon is visible?

D

David Thielen

Yeah. I have to sit on the WindowSelectionChange event and when it triggers I
have to parse the paragraph I am on. Much better if I only do it when my tab
is visible.

If not the tab, is there a way to tell if any of 4 buttons are visible?

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm




Patrick Schmid said:
You mean when your tab is visible?
Nope...

Patrick Schmid [OneNote MVP]
--------------
http://pschmid.net
***
Office 2007 RTM Issues: http://pschmid.net/blog/2006/11/13/80
***
Customize Office 2007: http://pschmid.net/office2007/customize
RibbonCustomizer Add-In: http://pschmid.net/office2007/ribboncustomizer
OneNote 2007: http://pschmid.net/office2007/onenote
***
Subscribe to my Office 2007 blog: http://pschmid.net/blog/feed


I have to sit on a very expensive Word event when my Ribon is visible. Is
there a way to get a call from Word when it is displayed and another call
when it is hidden?

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm
 
P

Patrick Schmid [MVP]

No.
There is one rule you can apply though: If your callbacks for that tab
haven't been executed yet, then the tab has never been visible. So let's
say you are changing a button every time you parse a paragraph. The
callback will only be executed once the tab is visible. So if the tab
hasn't been shown yet, the callback will not have been called. If the
tab is currently invisible, the callback won't be executed either.

Does that help?

Patrick Schmid [OneNote MVP]
--------------
http://pschmid.net
***
Office 2007 RTM Issues: http://pschmid.net/blog/2006/11/13/80
***
Customize Office 2007: http://pschmid.net/office2007/customize
RibbonCustomizer Add-In: http://pschmid.net/office2007/ribboncustomizer
OneNote 2007: http://pschmid.net/office2007/onenote
***
Subscribe to my Office 2007 blog: http://pschmid.net/blog/feed

Yeah. I have to sit on the WindowSelectionChange event and when it triggers I
have to parse the paragraph I am on. Much better if I only do it when my tab
is visible.

If not the tab, is there a way to tell if any of 4 buttons are visible?

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm




Patrick Schmid said:
You mean when your tab is visible?
Nope...

Patrick Schmid [OneNote MVP]
--------------
http://pschmid.net
***
Office 2007 RTM Issues: http://pschmid.net/blog/2006/11/13/80
***
Customize Office 2007: http://pschmid.net/office2007/customize
RibbonCustomizer Add-In: http://pschmid.net/office2007/ribboncustomizer
OneNote 2007: http://pschmid.net/office2007/onenote
***
Subscribe to my Office 2007 blog: http://pschmid.net/blog/feed


I have to sit on a very expensive Word event when my Ribon is visible. Is
there a way to get a call from Word when it is displayed and another call
when it is hidden?

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm
 
D

David Thielen

It helps a little. Once they start using us and then go back to standard
editing we then have this overhead from then on.

This is frustrating because about 3 years ago I talked to a Program Manager
and developer in the Word group and one of the biggies I told him we could
use was this functionality.

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm




Patrick Schmid said:
No.
There is one rule you can apply though: If your callbacks for that tab
haven't been executed yet, then the tab has never been visible. So let's
say you are changing a button every time you parse a paragraph. The
callback will only be executed once the tab is visible. So if the tab
hasn't been shown yet, the callback will not have been called. If the
tab is currently invisible, the callback won't be executed either.

Does that help?

Patrick Schmid [OneNote MVP]
--------------
http://pschmid.net
***
Office 2007 RTM Issues: http://pschmid.net/blog/2006/11/13/80
***
Customize Office 2007: http://pschmid.net/office2007/customize
RibbonCustomizer Add-In: http://pschmid.net/office2007/ribboncustomizer
OneNote 2007: http://pschmid.net/office2007/onenote
***
Subscribe to my Office 2007 blog: http://pschmid.net/blog/feed

Yeah. I have to sit on the WindowSelectionChange event and when it triggers I
have to parse the paragraph I am on. Much better if I only do it when my tab
is visible.

If not the tab, is there a way to tell if any of 4 buttons are visible?

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm




Patrick Schmid said:
You mean when your tab is visible?
Nope...

Patrick Schmid [OneNote MVP]
--------------
http://pschmid.net
***
Office 2007 RTM Issues: http://pschmid.net/blog/2006/11/13/80
***
Customize Office 2007: http://pschmid.net/office2007/customize
RibbonCustomizer Add-In: http://pschmid.net/office2007/ribboncustomizer
OneNote 2007: http://pschmid.net/office2007/onenote
***
Subscribe to my Office 2007 blog: http://pschmid.net/blog/feed



I have to sit on a very expensive Word event when my Ribon is visible. Is
there a way to get a call from Word when it is displayed and another call
when it is hidden?

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm
 
P

Patrick Schmid [MVP]

You could make yourself a special hidden button that you can keep around
only for the purpose of figuring out whether they are still using your
tab or not.
Alternatively, you can get some info about the currently active tab via
the Accessibility API. It's not ideal as it would only give you labels,
but it might give you what you need...

Patrick Schmid [OneNote MVP]
--------------
http://pschmid.net
***
Office 2007 RTM Issues: http://pschmid.net/blog/2006/11/13/80
***
Customize Office 2007: http://pschmid.net/office2007/customize
RibbonCustomizer Add-In: http://pschmid.net/office2007/ribboncustomizer
OneNote 2007: http://pschmid.net/office2007/onenote
***
Subscribe to my Office 2007 blog: http://pschmid.net/blog/feed

It helps a little. Once they start using us and then go back to standard
editing we then have this overhead from then on.

This is frustrating because about 3 years ago I talked to a Program Manager
and developer in the Word group and one of the biggies I told him we could
use was this functionality.

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm




Patrick Schmid said:
No.
There is one rule you can apply though: If your callbacks for that tab
haven't been executed yet, then the tab has never been visible. So let's
say you are changing a button every time you parse a paragraph. The
callback will only be executed once the tab is visible. So if the tab
hasn't been shown yet, the callback will not have been called. If the
tab is currently invisible, the callback won't be executed either.

Does that help?

Patrick Schmid [OneNote MVP]
--------------
http://pschmid.net
***
Office 2007 RTM Issues: http://pschmid.net/blog/2006/11/13/80
***
Customize Office 2007: http://pschmid.net/office2007/customize
RibbonCustomizer Add-In: http://pschmid.net/office2007/ribboncustomizer
OneNote 2007: http://pschmid.net/office2007/onenote
***
Subscribe to my Office 2007 blog: http://pschmid.net/blog/feed

Yeah. I have to sit on the WindowSelectionChange event and when it triggers I
have to parse the paragraph I am on. Much better if I only do it when my tab
is visible.

If not the tab, is there a way to tell if any of 4 buttons are visible?

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm




:

You mean when your tab is visible?
Nope...

Patrick Schmid [OneNote MVP]
--------------
http://pschmid.net
***
Office 2007 RTM Issues: http://pschmid.net/blog/2006/11/13/80
***
Customize Office 2007: http://pschmid.net/office2007/customize
RibbonCustomizer Add-In: http://pschmid.net/office2007/ribboncustomizer
OneNote 2007: http://pschmid.net/office2007/onenote
***
Subscribe to my Office 2007 blog: http://pschmid.net/blog/feed



I have to sit on a very expensive Word event when my Ribon is visible. Is
there a way to get a call from Word when it is displayed and another call
when it is hidden?

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm
 
D

David Thielen

How would the hidden button approach work?

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm




Patrick Schmid said:
You could make yourself a special hidden button that you can keep around
only for the purpose of figuring out whether they are still using your
tab or not.
Alternatively, you can get some info about the currently active tab via
the Accessibility API. It's not ideal as it would only give you labels,
but it might give you what you need...

Patrick Schmid [OneNote MVP]
--------------
http://pschmid.net
***
Office 2007 RTM Issues: http://pschmid.net/blog/2006/11/13/80
***
Customize Office 2007: http://pschmid.net/office2007/customize
RibbonCustomizer Add-In: http://pschmid.net/office2007/ribboncustomizer
OneNote 2007: http://pschmid.net/office2007/onenote
***
Subscribe to my Office 2007 blog: http://pschmid.net/blog/feed

It helps a little. Once they start using us and then go back to standard
editing we then have this overhead from then on.

This is frustrating because about 3 years ago I talked to a Program Manager
and developer in the Word group and one of the biggies I told him we could
use was this functionality.

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm




Patrick Schmid said:
No.
There is one rule you can apply though: If your callbacks for that tab
haven't been executed yet, then the tab has never been visible. So let's
say you are changing a button every time you parse a paragraph. The
callback will only be executed once the tab is visible. So if the tab
hasn't been shown yet, the callback will not have been called. If the
tab is currently invisible, the callback won't be executed either.

Does that help?

Patrick Schmid [OneNote MVP]
--------------
http://pschmid.net
***
Office 2007 RTM Issues: http://pschmid.net/blog/2006/11/13/80
***
Customize Office 2007: http://pschmid.net/office2007/customize
RibbonCustomizer Add-In: http://pschmid.net/office2007/ribboncustomizer
OneNote 2007: http://pschmid.net/office2007/onenote
***
Subscribe to my Office 2007 blog: http://pschmid.net/blog/feed


Yeah. I have to sit on the WindowSelectionChange event and when it triggers I
have to parse the paragraph I am on. Much better if I only do it when my tab
is visible.

If not the tab, is there a way to tell if any of 4 buttons are visible?

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm




:

You mean when your tab is visible?
Nope...

Patrick Schmid [OneNote MVP]
--------------
http://pschmid.net
***
Office 2007 RTM Issues: http://pschmid.net/blog/2006/11/13/80
***
Customize Office 2007: http://pschmid.net/office2007/customize
RibbonCustomizer Add-In: http://pschmid.net/office2007/ribboncustomizer
OneNote 2007: http://pschmid.net/office2007/onenote
***
Subscribe to my Office 2007 blog: http://pschmid.net/blog/feed



I have to sit on a very expensive Word event when my Ribon is visible. Is
there a way to get a call from Word when it is displayed and another call
when it is hidden?

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm
 
P

Patrick Schmid [MVP]

Something like this:
RibbonX:
<button id="InvisibleButton" getVisible="getRibbonVisible" />

C#:
public bool getRibbonVisible(IRibbonControl control) {
ribbonVisible=true;
return false;
}
private bool ribbonVisible=false;
private IRibbonUI ribbon; //assuming you set this with onLoad
void checkRibbonVisibility() {
ribbonVisible=false;
ribbon.InvalidateControl("InvisibleButton");
}

You only have to decide when to call checkRibbonVisibility(). Depending
on the performance cost of executing the callback (you might have to do
some checking to see what it is), you could do this whenever your event
gets triggered, but before you execute your parsing. Or you could do it
with a timer every 5-10 seconds or longer.
The callback will be executed once your tab is brought into the
foreground. There is no guaranteed order of execution for callbacks, so
you should have ribbonVisible=true on the top of all your callbacks for
the controls on that tab. While your tab is visible, getRibbonVisible
will always be executed right away after you called
checkRibbonVisibility. When your tab becomes invisible, it won't execute
the callback until it becomes visible again.
You can do this approach with any of your controls and callbacks, there
is no need to create a special one for it. However, I'd suggest you
create a dedicated one that has only one callback (your other controls
prob. have more than one each) and hence has the minimum performance
impact possible.
As I said before, you can use the Accessibility API alternatively to
query what the foreground tab is. I have only played around with this a
little bit, so I can't give you more than a few hints as to how to get
started with it.

That's really it though. There are no events in the object model that
would allow you query this kind of information directly. It's either one
of those two hacks.

Patrick Schmid [OneNote MVP]
--------------
http://pschmid.net
***
Office 2007 RTM Issues: http://pschmid.net/blog/2006/11/13/80
***
Customize Office 2007: http://pschmid.net/office2007/customize
RibbonCustomizer Add-In: http://pschmid.net/office2007/ribboncustomizer
OneNote 2007: http://pschmid.net/office2007/onenote
***
Subscribe to my Office 2007 blog: http://pschmid.net/blog/feed


How would the hidden button approach work?

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm




Patrick Schmid said:
You could make yourself a special hidden button that you can keep around
only for the purpose of figuring out whether they are still using your
tab or not.
Alternatively, you can get some info about the currently active tab via
the Accessibility API. It's not ideal as it would only give you labels,
but it might give you what you need...

Patrick Schmid [OneNote MVP]
--------------
http://pschmid.net
***
Office 2007 RTM Issues: http://pschmid.net/blog/2006/11/13/80
***
Customize Office 2007: http://pschmid.net/office2007/customize
RibbonCustomizer Add-In: http://pschmid.net/office2007/ribboncustomizer
OneNote 2007: http://pschmid.net/office2007/onenote
***
Subscribe to my Office 2007 blog: http://pschmid.net/blog/feed

It helps a little. Once they start using us and then go back to standard
editing we then have this overhead from then on.

This is frustrating because about 3 years ago I talked to a Program Manager
and developer in the Word group and one of the biggies I told him we could
use was this functionality.

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm




:

No.
There is one rule you can apply though: If your callbacks for that tab
haven't been executed yet, then the tab has never been visible. So let's
say you are changing a button every time you parse a paragraph. The
callback will only be executed once the tab is visible. So if the tab
hasn't been shown yet, the callback will not have been called. If the
tab is currently invisible, the callback won't be executed either.

Does that help?

Patrick Schmid [OneNote MVP]
--------------
http://pschmid.net
***
Office 2007 RTM Issues: http://pschmid.net/blog/2006/11/13/80
***
Customize Office 2007: http://pschmid.net/office2007/customize
RibbonCustomizer Add-In: http://pschmid.net/office2007/ribboncustomizer
OneNote 2007: http://pschmid.net/office2007/onenote
***
Subscribe to my Office 2007 blog: http://pschmid.net/blog/feed


Yeah. I have to sit on the WindowSelectionChange event and when it triggers I
have to parse the paragraph I am on. Much better if I only do it when my tab
is visible.

If not the tab, is there a way to tell if any of 4 buttons are visible?

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm




:

You mean when your tab is visible?
Nope...

Patrick Schmid [OneNote MVP]
--------------
http://pschmid.net
***
Office 2007 RTM Issues: http://pschmid.net/blog/2006/11/13/80
***
Customize Office 2007: http://pschmid.net/office2007/customize
RibbonCustomizer Add-In: http://pschmid.net/office2007/ribboncustomizer
OneNote 2007: http://pschmid.net/office2007/onenote
***
Subscribe to my Office 2007 blog: http://pschmid.net/blog/feed



I have to sit on a very expensive Word event when my Ribon is visible. Is
there a way to get a call from Word when it is displayed and another call
when it is hidden?

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm
 
D

David Thielen

Hi;

Well, not good. If our tab is not visible we have to call this on each caret
move to make sure it is still not visible. And that is the common case. Tried
both approaches.

I'm going to see if I can look for mouse events to see if the visible tab
has changed...

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm




Patrick Schmid said:
Something like this:
RibbonX:
<button id="InvisibleButton" getVisible="getRibbonVisible" />

C#:
public bool getRibbonVisible(IRibbonControl control) {
ribbonVisible=true;
return false;
}
private bool ribbonVisible=false;
private IRibbonUI ribbon; //assuming you set this with onLoad
void checkRibbonVisibility() {
ribbonVisible=false;
ribbon.InvalidateControl("InvisibleButton");
}

You only have to decide when to call checkRibbonVisibility(). Depending
on the performance cost of executing the callback (you might have to do
some checking to see what it is), you could do this whenever your event
gets triggered, but before you execute your parsing. Or you could do it
with a timer every 5-10 seconds or longer.
The callback will be executed once your tab is brought into the
foreground. There is no guaranteed order of execution for callbacks, so
you should have ribbonVisible=true on the top of all your callbacks for
the controls on that tab. While your tab is visible, getRibbonVisible
will always be executed right away after you called
checkRibbonVisibility. When your tab becomes invisible, it won't execute
the callback until it becomes visible again.
You can do this approach with any of your controls and callbacks, there
is no need to create a special one for it. However, I'd suggest you
create a dedicated one that has only one callback (your other controls
prob. have more than one each) and hence has the minimum performance
impact possible.
As I said before, you can use the Accessibility API alternatively to
query what the foreground tab is. I have only played around with this a
little bit, so I can't give you more than a few hints as to how to get
started with it.

That's really it though. There are no events in the object model that
would allow you query this kind of information directly. It's either one
of those two hacks.

Patrick Schmid [OneNote MVP]
--------------
http://pschmid.net
***
Office 2007 RTM Issues: http://pschmid.net/blog/2006/11/13/80
***
Customize Office 2007: http://pschmid.net/office2007/customize
RibbonCustomizer Add-In: http://pschmid.net/office2007/ribboncustomizer
OneNote 2007: http://pschmid.net/office2007/onenote
***
Subscribe to my Office 2007 blog: http://pschmid.net/blog/feed


How would the hidden button approach work?

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm




Patrick Schmid said:
You could make yourself a special hidden button that you can keep around
only for the purpose of figuring out whether they are still using your
tab or not.
Alternatively, you can get some info about the currently active tab via
the Accessibility API. It's not ideal as it would only give you labels,
but it might give you what you need...

Patrick Schmid [OneNote MVP]
--------------
http://pschmid.net
***
Office 2007 RTM Issues: http://pschmid.net/blog/2006/11/13/80
***
Customize Office 2007: http://pschmid.net/office2007/customize
RibbonCustomizer Add-In: http://pschmid.net/office2007/ribboncustomizer
OneNote 2007: http://pschmid.net/office2007/onenote
***
Subscribe to my Office 2007 blog: http://pschmid.net/blog/feed


It helps a little. Once they start using us and then go back to standard
editing we then have this overhead from then on.

This is frustrating because about 3 years ago I talked to a Program Manager
and developer in the Word group and one of the biggies I told him we could
use was this functionality.

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm




:

No.
There is one rule you can apply though: If your callbacks for that tab
haven't been executed yet, then the tab has never been visible. So let's
say you are changing a button every time you parse a paragraph. The
callback will only be executed once the tab is visible. So if the tab
hasn't been shown yet, the callback will not have been called. If the
tab is currently invisible, the callback won't be executed either.

Does that help?

Patrick Schmid [OneNote MVP]
--------------
http://pschmid.net
***
Office 2007 RTM Issues: http://pschmid.net/blog/2006/11/13/80
***
Customize Office 2007: http://pschmid.net/office2007/customize
RibbonCustomizer Add-In: http://pschmid.net/office2007/ribboncustomizer
OneNote 2007: http://pschmid.net/office2007/onenote
***
Subscribe to my Office 2007 blog: http://pschmid.net/blog/feed


Yeah. I have to sit on the WindowSelectionChange event and when it triggers I
have to parse the paragraph I am on. Much better if I only do it when my tab
is visible.

If not the tab, is there a way to tell if any of 4 buttons are visible?

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm




:

You mean when your tab is visible?
Nope...

Patrick Schmid [OneNote MVP]
--------------
http://pschmid.net
***
Office 2007 RTM Issues: http://pschmid.net/blog/2006/11/13/80
***
Customize Office 2007: http://pschmid.net/office2007/customize
RibbonCustomizer Add-In: http://pschmid.net/office2007/ribboncustomizer
OneNote 2007: http://pschmid.net/office2007/onenote
***
Subscribe to my Office 2007 blog: http://pschmid.net/blog/feed



I have to sit on a very expensive Word event when my Ribon is visible. Is
there a way to get a call from Word when it is displayed and another call
when it is hidden?

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm
 
P

Patrick Schmid [MVP]

No, you don't. The callback will be executed once your tab becomes
visible. That's the easy case.

You tried the accessibility API?

Patrick Schmid [OneNote MVP]
--------------
http://pschmid.net
***
Office 2007 RTM Issues: http://pschmid.net/blog/2006/11/13/80
***
Customize Office 2007: http://pschmid.net/office2007/customize
RibbonCustomizer Add-In: http://pschmid.net/office2007/ribboncustomizer
OneNote 2007: http://pschmid.net/office2007/onenote
***
Subscribe to my Office 2007 blog: http://pschmid.net/blog/feed

Hi;

Well, not good. If our tab is not visible we have to call this on each caret
move to make sure it is still not visible. And that is the common case. Tried
both approaches.

I'm going to see if I can look for mouse events to see if the visible tab
has changed...

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm




Patrick Schmid said:
Something like this:
RibbonX:
<button id="InvisibleButton" getVisible="getRibbonVisible" />

C#:
public bool getRibbonVisible(IRibbonControl control) {
ribbonVisible=true;
return false;
}
private bool ribbonVisible=false;
private IRibbonUI ribbon; //assuming you set this with onLoad
void checkRibbonVisibility() {
ribbonVisible=false;
ribbon.InvalidateControl("InvisibleButton");
}

You only have to decide when to call checkRibbonVisibility(). Depending
on the performance cost of executing the callback (you might have to do
some checking to see what it is), you could do this whenever your event
gets triggered, but before you execute your parsing. Or you could do it
with a timer every 5-10 seconds or longer.
The callback will be executed once your tab is brought into the
foreground. There is no guaranteed order of execution for callbacks, so
you should have ribbonVisible=true on the top of all your callbacks for
the controls on that tab. While your tab is visible, getRibbonVisible
will always be executed right away after you called
checkRibbonVisibility. When your tab becomes invisible, it won't execute
the callback until it becomes visible again.
You can do this approach with any of your controls and callbacks, there
is no need to create a special one for it. However, I'd suggest you
create a dedicated one that has only one callback (your other controls
prob. have more than one each) and hence has the minimum performance
impact possible.
As I said before, you can use the Accessibility API alternatively to
query what the foreground tab is. I have only played around with this a
little bit, so I can't give you more than a few hints as to how to get
started with it.

That's really it though. There are no events in the object model that
would allow you query this kind of information directly. It's either one
of those two hacks.

Patrick Schmid [OneNote MVP]
--------------
http://pschmid.net
***
Office 2007 RTM Issues: http://pschmid.net/blog/2006/11/13/80
***
Customize Office 2007: http://pschmid.net/office2007/customize
RibbonCustomizer Add-In: http://pschmid.net/office2007/ribboncustomizer
OneNote 2007: http://pschmid.net/office2007/onenote
***
Subscribe to my Office 2007 blog: http://pschmid.net/blog/feed


How would the hidden button approach work?

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm




:

You could make yourself a special hidden button that you can keep around
only for the purpose of figuring out whether they are still using your
tab or not.
Alternatively, you can get some info about the currently active tab via
the Accessibility API. It's not ideal as it would only give you labels,
but it might give you what you need...

Patrick Schmid [OneNote MVP]
--------------
http://pschmid.net
***
Office 2007 RTM Issues: http://pschmid.net/blog/2006/11/13/80
***
Customize Office 2007: http://pschmid.net/office2007/customize
RibbonCustomizer Add-In: http://pschmid.net/office2007/ribboncustomizer
OneNote 2007: http://pschmid.net/office2007/onenote
***
Subscribe to my Office 2007 blog: http://pschmid.net/blog/feed


It helps a little. Once they start using us and then go back to standard
editing we then have this overhead from then on.

This is frustrating because about 3 years ago I talked to a Program Manager
and developer in the Word group and one of the biggies I told him we could
use was this functionality.

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm




:

No.
There is one rule you can apply though: If your callbacks for that tab
haven't been executed yet, then the tab has never been visible. So let's
say you are changing a button every time you parse a paragraph. The
callback will only be executed once the tab is visible. So if the tab
hasn't been shown yet, the callback will not have been called. If the
tab is currently invisible, the callback won't be executed either.

Does that help?

Patrick Schmid [OneNote MVP]
--------------
http://pschmid.net
***
Office 2007 RTM Issues: http://pschmid.net/blog/2006/11/13/80
***
Customize Office 2007: http://pschmid.net/office2007/customize
RibbonCustomizer Add-In: http://pschmid.net/office2007/ribboncustomizer
OneNote 2007: http://pschmid.net/office2007/onenote
***
Subscribe to my Office 2007 blog: http://pschmid.net/blog/feed


Yeah. I have to sit on the WindowSelectionChange event and when it triggers I
have to parse the paragraph I am on. Much better if I only do it when my tab
is visible.

If not the tab, is there a way to tell if any of 4 buttons are visible?

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm




:

You mean when your tab is visible?
Nope...

Patrick Schmid [OneNote MVP]
--------------
http://pschmid.net
***
Office 2007 RTM Issues: http://pschmid.net/blog/2006/11/13/80
***
Customize Office 2007: http://pschmid.net/office2007/customize
RibbonCustomizer Add-In: http://pschmid.net/office2007/ribboncustomizer
OneNote 2007: http://pschmid.net/office2007/onenote
***
Subscribe to my Office 2007 blog: http://pschmid.net/blog/feed



I have to sit on a very expensive Word event when my Ribon is visible. Is
there a way to get a call from Word when it is displayed and another call
when it is hidden?

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top