# How to add an observer to the Sequence-Browser of module Sequences?

**URL:** https://discourse.slicer.org/t/how-to-add-an-observer-to-the-sequence-browser-of-module-sequences/25129
**Category:** Support
**Tags:** sequences, python
**Created:** [September 7, 2022, 2:17am UTC](https://discourse.slicer.org/t/how-to-add-an-observer-to-the-sequence-browser-of-module-sequences/25129 "2022-09-07T02:17:36Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![sunshine](https://avatars.discourse-cdn.com/v4/letter/s/3ec8ea/32.png) [@sunshine](https://discourse.slicer.org/u/sunshine)
#### Post date: [September 7, 2022, 2:17am UTC](https://discourse.slicer.org/t/how-to-add-an-observer-to-the-sequence-browser-of-module-sequences/25129/1 "2022-09-07T02:17:36Z")

</div>

Hi everyone,

I am trying to write my first extension module, and would like to synchronize the sequence browser in module Sequences and the module I am working on.

How can I add an observer to the Sequence Browser of module Sequences?  
And how to change the selection of the sequence browser of module Sequences using codes?

Thank you so much in advance!

---

<div class="post-metadata">

### Author: ![sunshine](https://avatars.discourse-cdn.com/v4/letter/s/3ec8ea/32.png) [@sunshine](https://discourse.slicer.org/u/sunshine)
#### Post date: [September 7, 2022, 3:52am UTC](https://discourse.slicer.org/t/how-to-add-an-observer-to-the-sequence-browser-of-module-sequences/25129/2 "2022-09-07T03:52:53Z")

</div>

Found it. Instead of calling the sequences widget (no signal), we need to call toolBar().  
Signal: `slicer.modules.sequences.toolBar().activeBrowserNodeChanged.connect()`  
Aquire: `slicer.modules.sequences.toolBar().activeBrowserNode()`  
Assign: `slicer.modules.sequences.widgetRepresentation().setActiveBrowserNode()`
