Hide ReadingPane "selector"?

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

Hide ReadingPane "selector"?
I would like to have custom buttons do the switch between the standard reading pane and my custom form. 
Eriq VanBibber


Guest


Is there a way to hide the ReadingPane "selector" control that appears above the standard reading pane?

I would like to provide my own buttons/events to cause the change between the default reading pane an my custom form.
Posted 06 Oct, 2019 13:40:33 Top
Andrei Smolin


Add-in Express team


Posts: 18821
Joined: 2006-05-11
Hello Eriq,

I assume you mean the control shown in the second screenshot at https://www.add-in-express.com/add-in-net/outlook-regions.php. If so, check https://www.add-in-express.com/creating-addins-blog/2016/05/31/customize-appearance-excel-task-panes-outlook-regions/.


Andrei Smolin
Add-in Express Team Leader
Posted 07 Oct, 2019 02:58:21 Top
Eriq VanBibber


Guest


Andrei,

Yep. the second screenshot. Do you have a name for that control? i call it a selector :).

thanks for the pointer to the ability to inherit from some base classes.
i'm quite familiar with such things.

however, the link you provided doesn't really seem to tie it all together for me. i'm sure it is because i'm still learning the ADX framework.

I'm working in Outlook (2010 and later).

I have an ADXOlFormsManager element in my addin.
I add an ADXOlFormsCollectionItem to this and set the class name to my ADXOlForm.
I set the Item to:
ExplorerAllowedDropRegions:= ReadingPane
ExplorerLayout:= ReadingPane


I fail to see which object i would change/override here in order to suppress the "selector" control.
Posted 07 Oct, 2019 11:25:54 Top
Andrei Smolin


Add-in Express team


Posts: 18821
Joined: 2006-05-11
Hello Eriq,

private void adxOlFormsManager1_OnInitialize()
        {
            adxOlFormsManager1.GetServiceContainerControlType = () => typeof(MyControlPane);
        }
public class MyControlPane : AddinExpress.Extensions.ADXContainerControlOL
    {
    }


You can use the MyControlPane class to hide (=not let them draw itself) or customize them in the way described in that blog.

If however you need to use controls of your own, you'll need to use two different panes:

1) it uses the ReadingPaneTop (or any ReadingPane*, not just ReadingPane) region; it doesn't show the header; instead, you use this pane as a replacement of the Add-in Express header: just draw your controls on it;
2) it uses the ReadingPane region; it doesn't show the header as well.


Andrei Smolin
Add-in Express Team Leader
Posted 08 Oct, 2019 08:13:49 Top
Eriq VanBibber


Guest


Andrei,

thanks for that last response. tied it together for me nicely.

however i cannot figure out how to simply hide the selector control. i was able to have it not drawn, but it still takes up space.

i want to remove it completely an use buttons either in the ribbon, or my own controls to switch to the custom pane/form.

does that make sense?
Posted 08 Oct, 2019 14:57:20 Top
Andrei Smolin


Add-in Express team


Posts: 18821
Joined: 2006-05-11
Hello Eriq,

We've created an example; see http://temp.add-in-express.com/support/test/ReadingPaneRegionWithoutHeader.zip.


Andrei Smolin
Add-in Express Team Leader
Posted 09 Oct, 2019 08:35:19 Top
Eriq VanBibber


Guest


Andrei,

Please don't be frustrated with me :).

I applied the pattern you provided in the example (and i had previously tried to override the EnableHeader property), but the panel selector control still appears, albeit after i show the form.

I've provided an animated GIF of what happens.

User added an image

The first button i hover over is in a TopReadingPaneForm. this form works perfectly.

When i click this button, i 'Show()' the ReadingPane form, and instantly the pane selector control also appears, even though i have overriden the EnableHeader property and set it to false.

is this possibly an Office 2010 specific challenge? I have not testing my stuff on OL2013 or later.
Posted 09 Oct, 2019 10:04:14 Top
Andrei Smolin


Add-in Express team


Posts: 18821
Joined: 2006-05-11
Hello Eriq,

The example shows how you hide the form; this hides the pane selector. We suggest that you register our sample add-in, show the form and switch to a folder. Then hide the form and switch to a folder.

Since we may not understand you, could you please explain (again) what is your final goal?


Andrei Smolin
Add-in Express Team Leader
Posted 10 Oct, 2019 02:57:59 Top
Eriq VanBibber


Guest


Andrei,

I want to be able to show/hide my custom form using either buttons from the ribbon, or from my own "toolbar".

When a user would click on my button, i want my form to show instead of the default reading pane.

When my custom form shows, i don't want the 'selector' control to show - just my form only.

The user would be able to switch back to the default reading pane by clicking my button a second time.

This is similar behavior as the attachment preview feature of outlook.


Specific to the actual use, i'm creating an add-in to show SMTP message headers. I wan't to show that as an alternate pane in the reading pane. Sort of like a toggle between the actual message, and the message headers. But...i don't want to use the 'pane selector' control that add-in-express is automatically creating.
So, when you first click on a message in outlook, every thing is as if no addin existed. you simply see the message as normal. No pane selector or anything.
Then, you click a button somewhere else (ribbon maybe) and POOF, the message headers pane appears and 'replaces' the message view. Click the button again, and POOF! you're back to reading the message again.

If such is not possible, i'm okay with that...but i hope such is not the case.

Regards,
Eriq
Posted 10 Oct, 2019 08:46:10 Top
Andrei Smolin


Add-in Express team


Posts: 18821
Joined: 2006-05-11
Hello Eriq,

Eriq VanBibber writes:
When a user would click on my button, i want my form to show instead of the default reading pane.
When my custom form shows, i don't want the 'selector' control to show - just my form only.
The user would be able to switch back to the default reading pane by clicking my button a second time.


Doesn't the project we created work in this fashion? It does the very same thing. the difference is: it provides two buttons instead of one.


Andrei Smolin
Add-in Express Team Leader
Posted 10 Oct, 2019 10:17:51 Top