Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

How to programmatically resize a CEP panel

Explorer ,
Mar 05, 2025 Mar 05, 2025

I've got this panel developed for After Effects, using CEP.

The panel default "snap-sizes" make it look very weird, so I want a control over panel's width and height.

Tried many ways like specifiying those values in the manifest.xml file:

      <UI>
        ...
        <Geometry>
          <Size>
            <Width>200</Width>
            <Height>400</Height>
          </Size>
          <MaxSize>
            <Width>200</Width>
            <Height>400</Height>
          </MaxSize>
          <MinSize>
            <Width>200</Width>
            <Height>400</Height>
          </MinSize>
        </Geometry>
         ...
      </UI>

In addition, tried using this function:

window.resizeTo(200, 400);

which after searching online found that it won't affect chromuim-based applications...

Also that function:

new CSInterface().resizeContent(200, 400);

 which also doesn't do anything...

Also found this dead-end discussion - how to resize panel extensions 

 

Unfortunately, nothing make it work...

I do know that you do able to specifiy snap sizes when developing plugins using the C++ sdk as follows:

void BasePanelUI::GetSnapSizes(A_LPoint *snapSizes, A_long *numSizesP)
{
    snapSizes[0].x = 205;
    snapSizes[0].y = 100;
    snapSizes[1].x = 205;
    snapSizes[1].y = 400;
    *numSizesP = 2;
}

 

Is there a way to do that when using CEP?

TOPICS
How to , User interface or workspaces
27
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation