# Multiple monitors

**URL:** <https://discourse.slicer.org/t/multiple-monitors/2250>\
**Category:** Support\
**Created:** [March 6, 2018, 2:17pm UTC](https://discourse.slicer.org/t/multiple-monitors/2250 "2018-03-06T14:17:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jason\_Gellis](https://avatars.discourse-cdn.com/v4/letter/j/90ced4/32.png) [@Jason\_Gellis](https://discourse.slicer.org/u/Jason_Gellis)\
**Post date:** [March 6, 2018, 2:17pm UTC](https://discourse.slicer.org/t/multiple-monitors/2250/1 "2018-03-06T14:17:26Z")

</div>

Is there any way to split the red, green, yellow, and 3d screen to another monitor? It would be nice to keep the modules on one screen and images on another. Thank you.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [March 6, 2018, 2:33pm UTC](https://discourse.slicer.org/t/multiple-monitors/2250/2 "2018-03-06T14:33:55Z")

</div>

For multi-monitor setups, we usually stretch the application window to cover all screens that we want to use and drag-and-drop the vertical splitters to be at the edge of the monitor. Several layouts have vertical splitters, but none of them would allow you to split 3 slice views. For that, you need to copy-paste the code below into the Python console to define and switch to a custom layout:

```
customLayout = """
<layout type="horizontal" split="true">
 <item>
  <view class="vtkMRMLSliceNode" singletontag="Red">
   <property name="orientation" action="default">Axial</property>
     <property name="viewlabel" action="default">R</property>
   <property name="viewcolor" action="default">#F34A33</property>
  </view>
 </item>
 <item>
  <view class="vtkMRMLSliceNode" singletontag="Green">
   <property name="orientation" action="default">Axial</property>
   <property name="viewlabel" action="default">G</property>
   <property name="viewcolor" action="default">#6EB04B</property>
  </view>
 </item>
 <item>
  <view class="vtkMRMLSliceNode" singletontag="Yellow">
   <property name="orientation" action="default">Axial</property>
   <property name="viewlabel" action="default">Y</property>
   <property name="viewcolor" action="default">#EDD54C</property>
  </view>
 </item>
 <item>
  <view class="vtkMRMLViewNode" singletontag="1">
   <property name="viewlabel" action="default">1</property>
  </view>
 </item>
</layout>
"""
  
customLayoutId=555

layoutManager = slicer.app.layoutManager()
layoutManager.layoutLogic().GetLayoutNode().AddLayoutDescription(customLayoutId, customLayout)                                         
layoutManager.setLayout(customLayoutId)

```

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/1/6/16af4c4c4a1b22c1b590b949b3aa39262b05ebe9.jpeg)

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [March 6, 2018, 3:36pm UTC](https://discourse.slicer.org/t/multiple-monitors/2250/3 "2018-03-06T15:36:44Z")

</div>

Also something like this works to split a widget out of the main window:

```auto
slicer.app.layoutManager().sliceWidget('Red').setParent(None)
slicer.app.layoutManager().sliceWidget('Red').show()

```

The widget gets reparented to the main window when you change the layout.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [March 8, 2018, 5:16pm UTC](https://discourse.slicer.org/t/multiple-monitors/2250/4 "2018-03-08T17:16:05Z")

</div>

You can also create a completely independent slice widget (that will not be reparented to the main window) as shown here: [https://www.slicer.org/wiki/Documentation/Nightly/ScriptRepository#Show\_a\_slice\_view\_outside\_the\_view\_layout](https://www.slicer.org/wiki/Documentation/Nightly/ScriptRepository#Show_a_slice_view_outside_the_view_layout)

It requires some API changes that I’ve just added, so it’ll work with nightly Slicer builds that you download tomorrow or later.
