# Cannot zoom and scroll in slice view(slicelets)

**URL:** <https://discourse.slicer.org/t/cannot-zoom-and-scroll-in-slice-view-slicelets/13365>\
**Category:** Development\
**Created:** [September 7, 2020, 7:11am UTC](https://discourse.slicer.org/t/cannot-zoom-and-scroll-in-slice-view-slicelets/13365 "2020-09-07T07:11:28Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chintha\_Siva\_Prasad](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/chintha_siva_prasad/32/7766_2.png) [@Chintha\_Siva\_Prasad](https://discourse.slicer.org/u/Chintha_Siva_Prasad)\
**Post date:** [September 7, 2020, 7:11am UTC](https://discourse.slicer.org/t/cannot-zoom-and-scroll-in-slice-view-slicelets/13365/1 "2020-09-07T07:11:28Z")

</div>

I created a slicelet of custom layouts that has three slice nodes.  
But I am not able to zoom into the slice view or scroll through the imgaes. Why is this happening?

---

<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:** [September 7, 2020, 2:47pm UTC](https://discourse.slicer.org/t/cannot-zoom-and-scroll-in-slice-view-slicelets/13365/2 "2020-09-07T14:47:36Z")

</div>

The widget needs access to the slice logics. If you want to create a widget outside the view layout then you can follow this example (for latest Slicer preview release):

[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)

Note that the recommended way of implementing slicelets is to define custom layout within the standard layout manager (and not to create standalone widgets). See details here: [https://www.slicer.org/wiki/Documentation/Nightly/Developers/Slicelets](https://www.slicer.org/wiki/Documentation/Nightly/Developers/Slicelets)

---

<div class="post-metadata">

**Author:** ![Chintha\_Siva\_Prasad](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/chintha_siva_prasad/32/7766_2.png) [@Chintha\_Siva\_Prasad](https://discourse.slicer.org/u/Chintha_Siva_Prasad)\
**Post date:** [September 7, 2020, 3:02pm UTC](https://discourse.slicer.org/t/cannot-zoom-and-scroll-in-slice-view-slicelets/13365/3 "2020-09-07T15:02:20Z")

</div>

I am getting a None object slicer.app.applicationLogic().GetSliceLogics() from this slice logics.

---

<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:** [September 7, 2020, 3:04pm UTC](https://discourse.slicer.org/t/cannot-zoom-and-scroll-in-slice-view-slicelets/13365/4 "2020-09-07T15:04:44Z")

</div>

Please follow the guidance in [https://www.slicer.org/wiki/Documentation/Nightly/Developers/Slicelets](https://www.slicer.org/wiki/Documentation/Nightly/Developers/Slicelets), i.e., use Slicer’s main window (do not call `--no-main-window`) and also make sure your code runs after the application startup is completed (you can observe the startup completed signal - ` slicer.app.connect("startupCompleted()", self.onStartupCompleted)`).

---

<div class="post-metadata">

**Author:** ![Chintha\_Siva\_Prasad](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/chintha_siva_prasad/32/7766_2.png) [@Chintha\_Siva\_Prasad](https://discourse.slicer.org/u/Chintha_Siva_Prasad)\
**Post date:** [September 8, 2020, 4:06am UTC](https://discourse.slicer.org/t/cannot-zoom-and-scroll-in-slice-view-slicelets/13365/5 "2020-09-08T04:06:30Z")

</div>

I want to run my application without the main window.

---

<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:** [September 8, 2020, 12:01pm UTC](https://discourse.slicer.org/t/cannot-zoom-and-scroll-in-slice-view-slicelets/13365/6 "2020-09-08T12:01:46Z")

</div>

Application behavior and setup is very different when there is a main window compared to when there is no main window. If you want to show any GUI elements but not all the widgets, then you can still show the main window but hide unwanted elements (or creating a custom application, where you have full control over what is added to the main window). Supporting a redundant no-main-window mode for displaying GUI would cost a lot of extra development, test, and maintenance effort that we rather invest into new features and fixes.

We still support no-main-window mode for simple scripts that do not use any widget classes.

What main widow element you would like to hide? Maybe we could add a simple-main-window mode that would not show menu, toolbar, and status bar by default.
