# How to enable the scalar bar for the foreground layer from Python terminal?

**URL:** <https://discourse.slicer.org/t/how-to-enable-the-scalar-bar-for-the-foreground-layer-from-python-terminal/11178>\
**Category:** Support\
**Created:** [April 18, 2020, 9:12pm UTC](https://discourse.slicer.org/t/how-to-enable-the-scalar-bar-for-the-foreground-layer-from-python-terminal/11178 "2020-04-18T21:12:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![xlucox](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/xlucox/32/6381_2.png) [@xlucox](https://discourse.slicer.org/u/xlucox)\
**Post date:** [April 18, 2020, 9:12pm UTC](https://discourse.slicer.org/t/how-to-enable-the-scalar-bar-for-the-foreground-layer-from-python-terminal/11178/1 "2020-04-18T21:12:01Z")

</div>

Hi everyone!!!

I’m trying to enable the scalar bar for the foreground layer from Python terminal.

Does anyone have idea how to set this?

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [April 19, 2020, 7:44pm UTC](https://discourse.slicer.org/t/how-to-enable-the-scalar-bar-for-the-foreground-layer-from-python-terminal/11178/2 "2020-04-19T19:44:09Z")

</div>

Here is an example:

> <https://github.com/SlicerRt/GelDosimetryAnalysis/blob/master/GelDosimetryAnalysis/GelDosimetryAnalysis.py#L165-L167>

  
Please note that for you things will be a bit simpler because in this example a separate layout manager is used, and you won’t have to create one like this.
