PropertyChanging event

Add-in Express™ Support Service
That's what is more important than anything else

PropertyChanging event
PropertyChanging event 
Karim




Posts: 170
Joined: 2006-01-02
hi,

i want to display a ribbon only in a mail view and not in contact, task, calendar etc.

i want works with PropertyChanging event

My code works fine in PropertyChanging event button


procedure TAddInModule.adxRibbonTabControls0Controls0PropertyChanging(
  Sender: TObject; PropertyType: TadxRibbonControlPropertyType;
  var Value: OleVariant; const Context: IDispatch);
begin
  if Context<>nil then
  begin
    if (PropertyType=rcptVisible) then
    begin
    if  (OutlookApp.ActiveExplorer.CurrentFolder.DefaultItemType = olMailItem) then
     Value := true
    else
      Value := false;
    end;
  end;
end;


but same code not works in


procedure TAddInModule.adxRibbonTabPropertyChanging(Sender: TObject;
  PropertyType: TadxRibbonControlPropertyType; var Value: OleVariant;
  const Context: IDispatch)

Posted 28 May, 2018 08:34:49 Top
Andrei Smolin


Add-in Express team


Posts: 18422
Joined: 2006-05-11
Hello Karim,

This is a wrong way. Instead, you should put another TadxRibbonTab onto the module and set TadxRibbonTab.Ribbons as required.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 28 May, 2018 09:46:21 Top
Karim




Posts: 170
Joined: 2006-01-02
Hello Andrei,

I do not understand the trick
Posted 28 May, 2018 11:13:53 Top
Andrei Smolin


Add-in Express team


Posts: 18422
Joined: 2006-05-11
Karim,

Ribbon controls are shown in this or that Ribbon. If you specify msrOutlookContact in the Ribbons property of a Ribbon component, the Ribbon controls the component creates will only be shown in Contact inspectors. Similarly, you can use a separate Ribbon component(s) to show your control(s) in Task inspectors.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 29 May, 2018 02:08:19 Top
Karim




Posts: 170
Joined: 2006-01-02
Hi Andrei,

My problem is more general I would not like the ribbon component is displayed only in the context mail.
I understand for Instpector Options but for Explorer ?
For explorer view i would like property like msrOutlookExplorerMail, msrOutlookExplorerJournal etc ...
Posted 29 May, 2018 08:13:49 Top
Andrei Smolin


Add-in Express team


Posts: 18422
Joined: 2006-05-11
Karim,

I see. sorry for pointing yoou to a wrong direction.

You only have OutlookExplorer. You need to handle ExplorerSelectionChange and FolderSwitch events to invalidate the controls that you update using the PropertyChanging event.

Karim writes:
but same code not works in


In what way the code doesn't work?

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 29 May, 2018 09:51:23 Top