# Vision Application Screen Indexing Issue

**URL:** <https://forum.inductiveautomation.com/t/vision-application-screen-indexing-issue/104830>\
**Category:** Ignition\
**Tags:** vision, ignition81\
**Created:** [April 8, 2025, 2:25pm UTC](https://forum.inductiveautomation.com/t/vision-application-screen-indexing-issue/104830 "2025-04-08T14:25:59Z")\
**Posts on this page:** 1\
**Showing post:** 5

<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:** [April 9, 2025, 6:37am UTC](https://forum.inductiveautomation.com/t/vision-application-screen-indexing-issue/104830/5 "2025-04-09T06:37:00Z")

</div>

I work with a lot of multi screen systems as well, and I like the the desktop names to be numbered from left to right and top to bottom as seen below

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/6/76e0be227853ae1b2697f8f00e3574febaef1517.png)

Here is the code I developed for sorting the screens:

```python
from java.awt import GraphicsEnvironment

# Get the bounds of each screen from the graphics environment and sort them from right to left, top to bottom
screens = sorted([device.defaultConfiguration.bounds for device in GraphicsEnvironment.getLocalGraphicsEnvironment().screenDevices], key=lambda screen: (screen.x, screen.y))
for index, screen in enumerate(screens):
	
	# Find the desired screen and do something with it here
	# The indexes will be sorted from left to right and top to bottom
	print index, screen.x, screen.y, screen.width, screen.height

```

Here are some forum examples where I've demonstrated this approach:  
• [Dual Monitor Screen Number Issue](https://forum.inductiveautomation.com/t/dual-monitor-screen-number-issue/94817/7)  
• [How to Show Monitor Number Using the Label Display](https://forum.inductiveautomation.com/t/how-to-show-monitor-number-using-the-label-display/93360/6)

---

_[View the full topic](https://forum.inductiveautomation.com/t/vision-application-screen-indexing-issue/104830)._
