Wondering if there was a way I could reduce my code?
I have images users can click on, but 4 out of them 12 images display at a time, so i was wondering how to reduce the code if possible? Show example if can, please
Wondering if there was a way I could reduce my code?
I have images users can click on, but 4 out of them 12 images display at a time, so i was wondering how to reduce the code if possible? Show example if can, please
Yes it is possible.
Create three global variable
All must be in same order.
Then use when any component clicked,
Get the index by comparing clicked image component with global list. With this index use select list item list from Tag name , and text of the label
Hello Tasha
Why are you getting a value immediately after storing it?
Your app could benefit from keeping lists of data and components, and implementing a sliding window to slide the components over the list of data.
Here is an example using Buttons and colors ...
Could you please give me an example ?
See, I like this idea a lot, but I would really like it to display 4 buttons
Hello again Tasha
The main area where code can be reduced is with your Procedures. You only need three Procedures, one each to record preference for breakfast, lunch and dinner, and the record requires only one tag for each too. Like this:
oh wow, this is way tidier, thank you so much !
Hello Tasha
Continuing with your Images as Buttons, you could also do this:
However, you could have just three meal buttons with a picker along side each, which would ensure your GUI fits the phone screen without the User needing to Scroll and reduce your code blocks too.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.