# Change the left control panel size

**URL:** <https://discourse.slicer.org/t/change-the-left-control-panel-size/18072>\
**Category:** Development\
**Created:** [June 11, 2021, 4:38am UTC](https://discourse.slicer.org/t/change-the-left-control-panel-size/18072 "2021-06-11T04:38:09Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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:** [June 11, 2021, 8:42pm UTC](https://discourse.slicer.org/t/change-the-left-control-panel-size/18072/2 "2021-06-11T20:42:35Z")

</div>

The module panel is sized automatically based on constraints defined by the widgets that are displayed in it. You can set a maximum width for the module panel (see below), but it will break the layout (widgets will “stick out” from it) if you reduce it beyond the feasible size.

```python
mainWindow = slicer.util.mainWindow()
modulePanelDockWidget = mainWindow.findChildren('QDockWidget','PanelDockWidget')[0]
modulePanelDockWidget.setMaximumWidth(500)

```

If you want to make the module panel more compressible without breaking layouts, you can change the font size or screen scaling. See more information here:

> [@4.11 Module panel is too wide and won't resize](https://discourse.slicer.org/t/4-11-module-panel-is-too-wide-and-wont-resize/11394/6):
>
> You can scale the text/button sizes of Slicer many ways: Reduce font size in Slicer in menu: Edit / Application settings / Appearance / Font and size Reduce the font scaling by running set QT\_SCALE\_FACTOR=0.5 in the command console and then starting Slicer in that console (you can make this permanent by adding this to your environment variables or creating a .bat file that sets this and then starts Slicer) You can adjust text scaling settings on your computer Drag-and-drop the module panel to …

---

_[View the full topic](https://discourse.slicer.org/t/change-the-left-control-panel-size/18072)._
