Region Separator

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

Region Separator
 
Nick Williams




Posts: 23
Joined: 2018-03-03
Hello,

We use Outlook regions to show a panel on the left or right of the Outlook UI. In Outlook 2016, when our panel is empty there is no dividing line between the Outlook interface elements and our panel. This looks misleading to the user. I have tried adding a border to a control in the region form, but this looks strange. Ideally I would like a full height vertical divider line in a light grey, similar to that of the Outlook Folder Pane.

Please see attached image.

Is this something that is achievable.

Thanks
Nick

[img]https://ibb.co/k86Dq4g[/img]
Posted 02 Mar, 2020 05:23:12 Top
Andrei Smolin


Add-in Express team


Posts: 17184
Joined: 2006-05-11
Hello Nick,

You can draw that line on your pane. Or you can customize ADXContainerControlOL as described at https://www.add-in-express.com/creating-addins-blog/2016/05/31/customize-appearance-excel-task-panes-outlook-regions/.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 02 Mar, 2020 06:20:45 Top
Nick Williams




Posts: 23
Joined: 2018-03-03
Hi Andrei,

I'm working within Outlook. I have derived a new class from 'ADXContainerControlOL'.

But OnDrawSplitter does not get called.

I can change the backColor, Padding, Draw Icon etc.

Thanks
Nick
Posted 02 Mar, 2020 07:48:10 Top
Andrei Smolin


Add-in Express team


Posts: 17184
Joined: 2006-05-11
Hello Nick,

Override OnDrawBackground and draw that line there.

OnDrawSplitter should be called when you click the splitter in the UI.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 02 Mar, 2020 08:02:23 Top
Nick Williams




Posts: 23
Joined: 2018-03-03
Hi,

There is no OnDrawBackground?

OnDrawSplitter is never called, even when clicked on? There appears to be no splitter at all. Just a slightly wider vertical line 2 or 3 pixels. Even with padding set to 0 all the way round.

Also is there anyway to determine if the regions is expanded or collapsed in the derived class?

Can you override the appearance of the expand/collapse button.

Lastly, is it possible to determine the collapsed width of the full height bar? This is currently 80 pixels.

Sorry for all the questions....

Thanks
Nick
Posted 02 Mar, 2020 08:13:47 Top
Andrei Smolin


Add-in Express team


Posts: 17184
Joined: 2006-05-11
Hello Nick,

We will create a sample and send it to you either later today or tomorrow.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 02 Mar, 2020 10:23:31 Top
Nick Williams




Posts: 23
Joined: 2018-03-03
Hi Andrei,

Thanks for the sample. OnDrawSplitter is called for all regions but those docked at the far left or right of the screen (full height). I could use OnDraw, but how to I tell which side the splitter is on. We support docking on all vertical sides. So the splitter can be on either side. I would like to draw a single vertical line where the splitter is only.

Can this be done? Your sample only draws the vertical line on the left of the bounds.

Thanks
Nick
Posted 04 Mar, 2020 14:42:16 Top
Andrei Smolin


Add-in Express team


Posts: 17184
Joined: 2006-05-11
Hello Nick,

Dock* regions are implemented differently and these methods aren't be called.

Nick Williams writes:
I could use OnDraw, but how to I tell which side the splitter is on.


Use ADXOlFormsColletionItem.ExplorerLayout: (Owner as ADXOlForm1).Item.ExplorerLayout.


Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 05 Mar, 2020 03:19:05 Top
Nick Williams




Posts: 23
Joined: 2018-03-03
Hi Andrei,

Thanks that works great.

Last question if I may, not necessarily related to Add-in Express. It there a way to determine the Outlook theme setting? e.g. White, Colorful, Dark Grey or Black?

Thanks
Nick
Posted 05 Mar, 2020 05:07:45 Top
Andrei Smolin


Add-in Express team


Posts: 17184
Joined: 2006-05-11
Hello Nick,

See the ADXAddinModule.OfficeColorScheme property and ADXAddinModule.OfficeColorSchemeChanged event.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 05 Mar, 2020 05:43:14 Top