Event Handler for Folder Selected

  • Thread starter Thread starter roger
  • Start date Start date
R

roger

I found event handlers for regular outlook items, but how do I insert
an event handler for other folders?

I have 2 buttons on a custom toolbar, and several application specific
folders. I need to enable or disable the toolbar buttons depending on
which folder the user selects.
 
Ok, I have an event handler working, but now I am trying to figure out
how to enable/disable toolbar buttons on the fly.
 
You would need a method to access the CommandBarButton objects that are your
buttons and set their Enabled property True or False as warranted by the
current state.
 
I created access to the button objects when they are created.
They're not null, but when setting the Enabled property to true, the
buttons remain
grayed out.
 
Are you getting a valid button object? Is the Enabled property returning an
error?

I've found that especially in WordMail that even if a button object is a
valid object that most of its properties and methods aren't valid even in
the button Click event handler. In those cases I have to actually
reinstantiate the button object using FindControl and then I can set
properties such as Picture and Mask and set visibility and enabled.
 
The return from the button.Enabled = true is true and button.Enabled =
false is false;

I will try using FindControl instead.
 
Sure it's the right button in the right Inspector or Explorer?

In my wrapper classes for Inspectors or Explorers I can set Enabled and
Visible true or false based on business logic conditions and it works.

The only time I have to re-instantiate the button objects are in WordMail
Inspectors.
 
Back
Top