how to change the width and height of the custom widget pragmatically in launchpad theme?. Setting in config file using position key and using the below code is not working for me. Is it a bug or am i missing something?
var pos = { width: '600px', height: '500px' }; html.setStyle(this.domNode, pos);
Solved! Go to Solution.
Mouli,
These two threads will help explain why you can not do this in the config.json like other themes:
Mouli,
These two threads will help explain why you can not do this in the config.json like other themes:
Thanks for your reply Robert. I want to change the size of the window after some user events( like on a button click), not on start up or from some other widget. I tried the below line and its not giving me the expected result. Any help will be appreciated. Thanks in advance.
this.setPosition(pos);
PanelManager.getInstance().normalizePanel(this.panel); //PanelManager.getInstance().normalizePanel(this);
Mouli,
Not knowing what the "pos" var has in it I could not say whats wrong with your code.
Robert,
"pos" variable is same as the one I mentioned in my question. check below.
var pos = { width: '600px', height: '500px' };
- this.setPosition(pos);
- PanelManager.getInstance().normalizePanel(this.panel); //PanelManager.getInstance().normalizePanel(this);
Mouli,
You need to re-look at the first link I provided the "pos" object need more than just width and height.
Thanks Robert. It helped a lot.