# Component outline on different z-order than component

**URL:** <https://forum.inductiveautomation.com/t/component-outline-on-different-z-order-than-component/92128>\
**Category:** Module Development\
**Tags:** vision\
**Created:** [June 19, 2024, 9:02pm UTC](https://forum.inductiveautomation.com/t/component-outline-on-different-z-order-than-component/92128 "2024-06-19T21:02:53Z")\
**Posts on this page:** 3\
**Page:** 2

<div class="post-metadata">

**Author:** ![Mathias\_Melling](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mathias_melling/32/67682_2.png) [@Mathias\_Melling](https://forum.inductiveautomation.com/u/Mathias_Melling)\
**Post date:** [June 24, 2024, 1:57pm UTC](https://forum.inductiveautomation.com/t/component-outline-on-different-z-order-than-component/92128/21 "2024-06-24T13:57:41Z")

</div>

This is a great idea! I'll pursue creating an OutlineHandler component that forces itself to the highest z-order and then waits for other components to tell it where to draw an outline. Much better than having an outline component for every component.

This should work very well extending the `AbstractVisionShape` class, as it allows you to specify an area for mouse-hit testing. So I can make the bounds of the OutlineHandler the same as the Container it is on and give it no area at all, so that the mouse never hits it.

---

<div class="post-metadata">

**Author:** ![justinedwards.jle](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justinedwards.jle/32/37854_2.png) [@justinedwards.jle](https://forum.inductiveautomation.com/u/justinedwards.jle)\
**Post date:** [June 24, 2024, 2:51pm UTC](https://forum.inductiveautomation.com/t/component-outline-on-different-z-order-than-component/92128/22 "2024-06-24T14:51:43Z")

</div>

> [@Mathias\_Melling](#):
>
> OutlineHandler component

My [Component Spotlight](https://inductiveautomation.com/exchange/2566/overview) resource on the exchange behaves in this way. It maps every component in the window at initialization, and then dynamically creates a flashing, semi transparent, abstract vision shape around the component to highlight where it is in the window. It's scripted in Jython, so it won't directly translate to what you're doing, but it's possible that it would be useful to look at how it crawls through and maps nested components as well as components that are rendered by template canvases and repeaters so it can accurately place the shape no matter what it's relative placement within the window ends up being.

![Component Spotlight Demo 02](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/1/d15f21815313ef307e8d0012024ea834e5f2215b.gif)

---

<div class="post-metadata">

**Author:** ![Mathias\_Melling](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/mathias_melling/32/67682_2.png) [@Mathias\_Melling](https://forum.inductiveautomation.com/u/Mathias_Melling)\
**Post date:** [June 24, 2024, 6:11pm UTC](https://forum.inductiveautomation.com/t/component-outline-on-different-z-order-than-component/92128/23 "2024-06-24T18:11:49Z")

</div>

Here is my result, after creating an Outline Handler Component.

[Previous page](https://forum.inductiveautomation.com/t/component-outline-on-different-z-order-than-component/92128.md?page=1)
