How to create a dynamic menu

Hi, I’m creating a dynamic menu that the user can customize. From a MySql database I download all the possible menu items (45) which I show on 15 lines of three items each as you can see in the attached image.


To do this, however, I created 15 rows with three buttons on each row. However, the user can choose both which icon to show and the order in which to show them. Then I download the icons and related parameters into list-type variables and with these I compose (manually) the menu. But, in practice, this is a Data Viewer Grid. Can you give me some advice on how to handle it instead of doing it line by line? Thank you

If you want to use a Data Viewer Grid (DVG), you’re limited to two buttons across. It does make things easier in the sense that you just store the icon and title text in a data source and the DVG syncs everything. If you change the content of the data source – for example, switching to rows’ data – then the DVG will show the updated changes.

Thanks tatiang, but reducing to two buttons per row becomes too long to scroll through. That’s why I’m trying to make it 3 or 4 buttons.
I was thinking of some variant of Listview…

I think you’ll either need to set this up manually or use Any Component blocks to create/clone the buttons you need.

This is what I’m doing to assign icons to blocks and intercept the button. I hope there is some better way to manage a menu…
Thanks for your help

Did you mean to include a screenshot?

All MenuXXXXX variables are lists and contain the icons, the page titles, the name of the screens, the name of the table to which they are linked, and the key for the link. These variables are set with values ​​from a MySql query in the previous Screen.

Yep, that’s pretty much how I would do it.

Actually what I would need is a custom listview.
I should define the line and then repeat it.
With other tools like AppGyver there is this possibility…

@tatiang
I saw this post:

Couldn’t it be changed by inserting three buttons in the rows?

I suppose so. The math can get a little confusing when trying to identify which button was pressed but I think I may have done something like that before with a DVL. I tend to favor cloned components in groups for something like that but you could always experiment with that.

I think the limitation of a DVL is that it syncs data from one for of a data source for each row of the DVL. So if you’re wanting three different data sets in a single row of a DVL, I’m not sure how you pull that off.

If the limitation of a DVL is that it synchronizes data from a data source for each row of the DVL I don’t think it’s easy to intervene.
I think it’s easier to create a ListView-like component by placing the data in a two-dimensional array.
The biggest problem is that I should know how a ListView works inside and how it was written. I don’t think so with Thunkable… :grinning:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.