Welcome Dialog

Welcome to the Community!

We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.


SDK: Dialog: Variable number of rows in group_box

New Here ,
Nov 20, 2021 Nov 20, 2021

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 🙂

 

 

TOPICS
SDK

Views

34

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Nov 20, 2021 Nov 20, 2021
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)

Likes

Translate

Translate
LEGEND ,
Nov 20, 2021 Nov 20, 2021

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)

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 21, 2021 Nov 21, 2021

Copy link to clipboard

Copied

LATEST

Thank you, master  🙂

 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines