xxxpilot Posted June 26, 2019 Share Posted June 26, 2019 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. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted June 26, 2019 Share Posted June 26, 2019 1 hour ago, xxxpilot said: some_panel.LayoutAttribs.Columns = 5; Hello, This post may help you: http://forums.unigui.com/index.php?/topic/11104-change-layoutconfigflex-at-runtime/ Quote Link to comment Share on other sites More sharing options...
xxxpilot Posted June 26, 2019 Author Share Posted June 26, 2019 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. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted June 26, 2019 Share Posted June 26, 2019 Can you make a simple testcase for reproduce? Quote Link to comment Share on other sites More sharing options...
xxxpilot Posted June 26, 2019 Author Share Posted June 26, 2019 since its really convinient for me to resolve, it will be ready in 5 mins.. hold on pls Quote Link to comment Share on other sites More sharing options...
Sherzod Posted June 26, 2019 Share Posted June 26, 2019 Ok Quote Link to comment Share on other sites More sharing options...
xxxpilot Posted June 26, 2019 Author Share Posted June 26, 2019 Here it is..columns.zip Quote Link to comment Share on other sites More sharing options...
Sherzod Posted June 26, 2019 Share Posted June 26, 2019 11 minutes ago, xxxpilot said: Here it is..columns.zip ... grid_items.LayoutAttribs.Columns := 3; // suggested by forum: grid_items.JSInterface.JSAssign('layout.columns', [grid_items.LayoutAttribs.Columns]); grid_items.JSInterface.JSCall('updateLayout', []); ... 1 2 Quote Link to comment Share on other sites More sharing options...
xxxpilot Posted June 26, 2019 Author Share Posted June 26, 2019 Thank you very much! Suggested code - works. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.