TotalCross / totalcross

TotalCross is a Software Development Kit that helps cross platform application development. Currently supported platforms are: Windows, Wince, Android, iOS, Linux and Linux ARM for embedded systems.
https://www.totalcross.com
GNU Lesser General Public License v2.1
222 stars 40 forks source link

how to implement accordion with container that has other element as dropdown #346

Closed nosadaniel closed 3 years ago

nosadaniel commented 3 years ago

I looked at their example on github but they show how to make a kind of input (a multiedit) for the person to type and not a container that has label and two buttons

Devices:

Please complete the following information:

Screenshot 2021-05-25 at 12 40 09

Screenshots or videos

If applicable, add some screenshots and/or videos to help to explain your problem.

brunoamuniz commented 3 years ago

hello @nosadaniel

If you solved the issue by yourself, please post some tips for other users that might be the sabe question =)

Cheers,

nosadaniel commented 3 years ago

The following are steps that solved my problem:

  1. Initialise an array of any Container you want to add to the AccordionContainer. AccordionContainer.Group gr = new AccordionContainer.Group(); AccordionContainer ac[] = new AccordionContainer[5]; Label threatDetails[] = new Label[5];
    Button ban = new Button[5];

  2. run a loop to add values to your container objects

  3. run a loop to add AccordionContainer (add(ac[])) and add your container items to AccordionContainer

20210627014953