# Capture slice view widget events

**URL:** <https://discourse.slicer.org/t/capture-slice-view-widget-events/15278>\
**Category:** Development\
**Created:** [December 29, 2020, 5:50pm UTC](https://discourse.slicer.org/t/capture-slice-view-widget-events/15278 "2020-12-29T17:50:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![talmazov](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/talmazov/32/3966_2.png) [@talmazov](https://discourse.slicer.org/u/talmazov)\
**Post date:** [December 29, 2020, 5:50pm UTC](https://discourse.slicer.org/t/capture-slice-view-widget-events/15278/1 "2020-12-29T17:50:50Z")

</div>

Hey all,  
I would like to know if it is possible to attach a function callback on event associated with the view slice’s change in position. Basically callback on the slider i have circled in the attached screenshot.

![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/9/8/98b67153d8b4c9b05540c5d004a158ca81d1b7f3.png)

Thanks!

---

<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:** [December 29, 2020, 7:04pm UTC](https://discourse.slicer.org/t/capture-slice-view-widget-events/15278/2 "2020-12-29T19:04:16Z")

</div>

You probably don’t want to observe GUI widget events, but changes in the slice node position. You can find an example of observing slice node changes here: [https://www.slicer.org/wiki/Documentation/Nightly/ScriptRepository#Measure\_angle\_between\_two\_slice\_planes](https://www.slicer.org/wiki/Documentation/Nightly/ScriptRepository#Measure_angle_between_two_slice_planes)
