# FMOD Studio scripting API - Set fixed dialog window size : no resizing

**URL:** <https://qa.fmod.com/t/fmod-studio-scripting-api-set-fixed-dialog-window-size-no-resizing/19043>\
**Category:** FMOD Studio\
**Created:** [July 22, 2022, 12:45pm UTC](https://qa.fmod.com/t/fmod-studio-scripting-api-set-fixed-dialog-window-size-no-resizing/19043 "2022-07-22T12:45:06Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![RobinBouchez](https://avatars.discourse-cdn.com/v4/letter/r/c6cbf5/32.png) [@RobinBouchez](https://qa.fmod.com/u/RobinBouchez)\
**Post date:** [July 22, 2022, 12:45pm UTC](https://qa.fmod.com/t/fmod-studio-scripting-api-set-fixed-dialog-window-size-no-resizing/19043/1 "2022-07-22T12:45:06Z")

</div>

Hi,

I want to make a simple tool for FMOD Studio. And I want that my dialogue window to not change size, but sizepolicy doesn’t work on the dialog window.

Thanks,

```auto
   studio.menu.addMenuItem({ 
    name: " ***\\****",
    keySequence: "Ctrl+I",
   execute: function() {
    studio.ui.showModelessDialog({
        windowTitle: " *****",
        windowWidth: 600,
        windowHeight: 100,
        widgetType: studio.ui.widgetType.Layout,
        layout: studio.ui.layoutType.VBoxLayout,
        contentsMargins: { left: 0, top: 0, right: 0, bottom: 0 },
        sizePolicy: { horizontalPolicy: studio.ui.sizePolicy.Fixed, 
                      verticalPolicy: studio.ui.sizePolicy.Fixed },
        spacing: 10,

```

---

<div class="post-metadata">

**Author:** ![jeff\_fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/jeff_fmod/32/1766_2.png) [@jeff\_fmod](https://qa.fmod.com/u/jeff_fmod)\
**Post date:** [July 26, 2022, 11:58pm UTC](https://qa.fmod.com/t/fmod-studio-scripting-api-set-fixed-dialog-window-size-no-resizing/19043/2 "2022-07-26T23:58:58Z")

</div>

`windowWidth` and `windowHeight` are working fine for me in the latest version of FMOD Studio. What version are you using?  
Does it work if you change the window width and height inside the existing EngineDesigner.js example script? i.e

```cpp
studio.menu.addMenuItem({
    name: "FMOD Examples\\Engine Designer",
    keySequence: "Ctrl+Shift+E",
    execute: function() {
    
        var sliderResolution = 10000;
        
        studio.ui.showModelessDialog({
            windowTitle: "Engine Designer",
+ windowWidth: 900,
+ windowHeight: 900,
            widgetType: studio.ui.widgetType.Layout,
            layout: studio.ui.layoutType.VBoxLayout,
            spacing: 12,
            items: [
...

```

---

<div class="post-metadata">

**Author:** ![RobinBouchez](https://avatars.discourse-cdn.com/v4/letter/r/c6cbf5/32.png) [@RobinBouchez](https://qa.fmod.com/u/RobinBouchez)\
**Post date:** [August 1, 2022, 8:42am UTC](https://qa.fmod.com/t/fmod-studio-scripting-api-set-fixed-dialog-window-size-no-resizing/19043/3 "2022-08-01T08:42:55Z")

</div>

Hi,  
I’m using an older version. I’m using FMOD 2.02.06.  
Yeah, `windowHeight` and `windowWidth` work fine, but is there a way to disable the resizing of the main window, so that the `windowHeight` and `windowWidth` are fixed?

thanks.

---

<div class="post-metadata">

**Author:** ![jeff\_fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/jeff_fmod/32/1766_2.png) [@jeff\_fmod](https://qa.fmod.com/u/jeff_fmod)\
**Post date:** [August 2, 2022, 12:40am UTC](https://qa.fmod.com/t/fmod-studio-scripting-api-set-fixed-dialog-window-size-no-resizing/19043/4 "2022-08-02T00:40:58Z")

</div>

I see what you mean now- `sizePolicy` doesn’t appear to be working correctly. I have passed this onto the Dev team to investigate, thank you for flagging!

---

<div class="post-metadata">

**Author:** ![jeff\_fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/jeff_fmod/32/1766_2.png) [@jeff\_fmod](https://qa.fmod.com/u/jeff_fmod)\
**Post date:** [August 4, 2022, 10:58pm UTC](https://qa.fmod.com/t/fmod-studio-scripting-api-set-fixed-dialog-window-size-no-resizing/19043/5 "2022-08-04T22:58:09Z")

</div>

After consulting with the develpment team, it turns out that window size policy only relates to the contents of the window and not the window itself, so setting the size policy will not affect whether the dialogue window itself can resize. The documentation on this was recently revised with this point [ui.sizePolicy](https://fmod.com/docs/2.02/studio/scripting-api-reference-ui.html#uisizepolicy), and it looks like there is no way to set a fixed window size unfortunately.
