Jump to content

Changing amount of columns in table layout at runtime


xxxpilot

Recommended Posts

Hello,

By default the number of columns in table layout is 0. So, I have TUniContainerPanel object named "some_panel" and I wish to adjust amount of columns at runtime, setting :

some_panel.LayoutAttribs.Columns = 5;

.. and it does nothing. Any objects added to that "some_panel" placed in single row. Is there some "tricks" for this? Because if I set the amount of columns = 5 in design time - it obviously has 5 columns.

Link to comment
Share on other sites

Just tried the code to change table layout columns to amount of 2:

some_grid.JSInterface.JSCode(#1'.setConfig({columns:2});');
some_grid.JSInterface.JSCall('updateLayout', []);

Aaaand.. nope, all added components appearing in one row (as by default). All other properties of some_grid (TUniContainerPanel) are default.

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