2020-08-12 02:50 PM
Does anyone have a simple example for a picklist? I tried making a custom contrainer for a "pick list item" then I used a scrollwheel container to make a list. But how do I edit the code to change the names of the items?
I tried following the example from "Tutorial 4: Creating a Scroll Wheel with Custom Behavior" but I can't get it to compile. It gives me the following error:
gui/include/gui/containers/NumberList.hpp:16:21: error: 'textBuffer' was not declared in this scope
Unicode::itoa(no, textBuffer, TEXT_SIZE, 10);
But I dont understand how I am supposed to declare a textBuffer and have it linked to my WildCard text that I created in my customcontainer. Any help is appreciated. I'm using STM32H747I-DISCO v(1.0.0).
2020-08-13 02:06 AM
Hello,
I think for your idea, you should probably better look towards a ListLayout inside a Scrollable Container.
Please have a look at the ListLayout Example available in the Designer. I think this will help you.
/Alexandre
2020-08-13 09:09 AM
Hi Alexandre, thanks for the response. Isn't the whole point of the scroll wheel supposed to make it easy for pick lists? I mean it does make it easy, I just want to be able to edit the wildcard text for each item. Using a ListLayout inside a Scrollable Container doesnt really work because the whole point of a pick list is you can only pick 1 item from the list. With your example, I can slide it in between two values (then how am I supposed to know which one was chosen). Also, where is the example you are talking about? Are you talking about the Demo it comes with?
2020-08-13 11:25 PM
Hello,
I think I understand better now.
You can use the Scroll Wheel for your pick list then. To change the content of the wildcard for each item, please refer to the "Scroll List and Wheel Example" available on TouchGFX Designer.
When you open TouchGFX Designer, you have to select an Application Template on the left and a UI Template on the right. When you choose a UI Template, you have different Examples. I'm talking about those examples.
/Alexandre