10-01-2024 11:21 AM
Hello
I have a cluster and need to fill it programmatically
If I have 3 options a cluster should appear with the 3 options I want to insert (as in the image)
But if you have 1, 5, 6, 7 options you should increase and the other options appear
The idea is to use it as a dropdown menu with options where the user selects what he wants to do
How can i do that?
10-01-2024 11:26 AM
A cluster has a fixed number of elements at compile time, but you can hide elements. Create a cluster with the max number of elements needed, then hide some as needed.
Seems convoluted. Maybe a listbox would me a more reasonable solution once we know more about your use case.
10-01-2024 11:43 AM
It's a menu of options at the top of the screen (like on a web page) where you have several options to select from
When the user selects one of them, the options for the menu should appear
Something along these lines:
10-01-2024 11:45 AM - edited 10-01-2024 11:49 AM
I don't understand why you think you need a cluster for that.
If you already have all the program logic implemented for a cluster with a fixed number of elements (do you?), just follow my advice and make a cluster with all possible elements, Set it to "auto-sizing: arrange vertically" and make only the desired elements visible.
10-01-2024 12:45 PM
If the example case you show is close to what you're using it for, you could use a picture ring:
There are two problems with picture rings though:
1. You have to manually import all the pictures
2. You can't change the list while it runs, though you can disable some elements:
Otherwise, a Cluster with the other suggestions for things may work out as you want.
10-01-2024 01:00 PM
Here are instructions for a Hamburger Menu. I think that is what you want.
But you cannot add/remove elements as desired. You may have to over specify your options, then make some visible/hidden as a workaround.
10-02-2024 07:42 AM
Can you share the country selector control?
Country dropdown with flags like this can be useful for my project.
10-02-2024 11:08 AM
@maxnoder1995 wrote:
Can you share the country selector control?
Country dropdown with flags like this can be useful for my project.
If you're talking about the example of a picture ring I posted, I didn't save it or anything. The process was this:
1. Add a "picture ring" control.
2. Use the Windows "snipping tool" to take a screenshot of a flag somewhere. (Or, in some other way, get a picture of a flag into the clipboard.)
3. Right-click the picture ring and choose one of the "Import picture..." options
4. Repeat 2 and 3 until all the flags you need are there. Probably try to get all of them from the same source to match sizes and colors.