Jump to content

Recommended Posts

Posted

Hi all, apparently it is not possible to change the flex at runtime, for example for a panel.

Is there a magic JS script that let the component redraw himself using the new flex set ?

 

Thanks

Andrea

Posted

Hi,

 

Have you tried?

UniPanel1.JSInterface.JSCall('updateLayout', []);
...
UniPanel3.JSInterface.JSCode(#1'.setConfig({flex:1});');
...
UniPanel1.JSInterface.JSCall('updateLayout', []);
Posted
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 <----------
Posted
Tried the following, but nothing happens.

 

  UniPanel2.layoutconfig.Flex:=1;

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

  UniPanel1.JSInterface.JSCall('doLayout', []); // UniPanel1 <----------
  • 4 years later...
Posted
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'

Posted

Hello,

1 hour ago, horacio said:

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

Be aware that JS is case sensitive! So try this: columnWidth instead of ColumnWidth.

Posted
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?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...