Jump to content

Table layout and redraw


neseir

Recommended Posts

Hi

 

How can I get the table layout to change number of columns runtime ? Setting the layoutAttribs.Columns to a different number does not update the rendering (set to 2 columns at designtime and changed to 4 runtime keep adding components as it still is 2). Not sure if invalidating and refresh is meant to be used but they did not do any difference.

 

BR

Eirik

 

Link to comment
Share on other sites

Hi,

 

One possible solution, for example for UniContainerPanel1:

procedure TMainForm.UniButton1Click(Sender: TObject);
begin
  with UniContainerPanel1 do
  begin
    LayoutAttribs.Columns := 4;
    JSInterface.JSCall('setLayout', [JSControl.JSObject('type:"table", columns:'+IntToStr(LayoutAttribs.Columns))]);
  end;
end;

Best regards,

Link to comment
Share on other sites

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...