Jump to content

Change LayoutConfig.Flex at runtime


arilotta

Recommended Posts

UniPanel1.JSInterface.JSCall('updateLayout', []);
...
UniPanel3.JSInterface.JSCode(#1'.setConfig({flex:1});');
...
UniPanel1.JSInterface.JSCall('updateLayout', []);

 

updateLayout for parent panel:

  UniPanel2.layoutconfig.Flex:=1;
  UniPanel2.JSInterface.JSCode(#1'.setConfig({flex:1});');
  UniPanel1.JSInterface.JSCall('updateLayout', []); // UniPanel1 <----------
Link to comment
Share on other sites

Tried the following, but nothing happens.

 

  UniPanel2.layoutconfig.Flex:=1;

  UniPanel2.JSInterface.JSCode(#1'.setConfig({flex:1});');

  UniPanel1.JSInterface.JSCall('doLayout', []); // UniPanel1 <----------
Link to comment
Share on other sites

  • 4 years later...
On 8/21/2018 at 11:56 AM, Sherzod said:

Try this:

UniPanel2.layoutconfig.Flex:=1;
UniPanel2.JSInterface.JSAssign('flex', [1]);
UniPanel1.JSInterface.JSCall('doLayout', []);

Hi,

with Layout Column does not work change ColumnWidth

UniPanel4.layoutconfig.ColumnWidth := 0.5; 
UniPanel4.JSInterface.JSCode(#1'.setConfig({ColumnWidth :0.5});');

UniPanel3.JSInterface.JSCall('updateLayout', []); //Panel with Layout = 'column'

Link to comment
Share on other sites

8 hours ago, Sherzod said:

Hola,

¡Tenga en cuenta que JS distingue entre mayúsculas y minúsculas! Entonces intente esto:  columnWidth  en lugar de ColumnWidth.

¡Thaks it work!

Where can I find correct names JS like columnWidth, Flex, Etc?

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...