Copy link to clipboard
Copied
[SDK] I need to present a dialogbox with a variable number of rows - I don't know beforehand how many rows there will be. I can't figure out how to do this.
If I do something like
local groupBox = f:group_box{}
and then use table.insert to add f:row elements I end up with an empty container.
I read somewhere in the manual: "To create the containment hierarchy, use the view factory to create a container, and within that call, use it to create the child containers and controls:" Does that mean that what I want is not possible?
I hope someone can help me out 🙂
Here's how to do it:
local rows = {}
for i = 1, n do
table.insert (rows, f:static_text {title = "Row " .. i})
end
rows.title = "Group Box Title"
local box = f:group_box (rows)
Copy link to clipboard
Copied
Here's how to do it:
local rows = {}
for i = 1, n do
table.insert (rows, f:static_text {title = "Row " .. i})
end
rows.title = "Group Box Title"
local box = f:group_box (rows)
Copy link to clipboard
Copied
Thank you, master 🙂