I am looking to place a label, slider and a text box in a horizontal arrangement
and then duplicate this about 10 times.
When the user moves a slider the value is displayed in the corresponding text box.
I can get the component -- it shows up as
com.google.appinventor.components.runtime.slider@c97d8a1 ( or similar)
I would like to get the name of the slider and then programmatically update the text field next to it.
As an aside is there a way to programmatically do this for a list of sliders with text names
Cotton - sliderCotton - textboxCotton
Silk - sliderSilk - textboxSilk
...
Polyester - sliderPolyester - textboxPolyester
a change to a component using anycomponent does not allow me to get to the exact component.
Thanks
Shekhar
Thank you for your help. This is exactly what I was looking for.
Shekhar
A question though...
Since my list is long (about 20 items -- for 20 different content items
Here is my list ....
Acrylic,Burlap/Jute,Cotton,Flax ,Fur,Hemp,Leather,Linen,Mohair ,Nylon ,Olefin ,Polyacrylic ,Polyester ,Polypropylene ,Rayon ,Silk ,Vinyl ,Viscose ,Wool ,Wood ,Metal ,Glass ,Plastic
Is there a way to automatically create the blocks designer blocks in the horizontal arrangement and name the labels , sliders and textboxes and then create the initialize global (sliders and textboxes). instead of having to create the code every time a new content item is added to the list.
This is exciting! Thank you for your help.
what I had meant in the previous post as either a list or even better a file or even better an sql read from a database..
Thanks
Shekhar
ABG
July 29, 2024, 3:06am
6
How about a single slider for data entry, reused against the current Selection from a ListView populated with the keys of a dictionary mapping material names into their numeric values?
If you need a comparative display, use a bar graph.
TIMAI2
July 29, 2024, 7:52am
7
Using the CompCreator extension , you create your view dynamically, and populate it with data from a list or file.
Herewith an example:
sliders_Dynamic.aia (37.7 KB)
Credits @Kevinkun for CompCreator
Dumb question....
How does one go thru the list of the Horizontal Arrangements and get at the value of the text boxes.
I tried to use the get value but the VisibleComponent HorizontalArrangement would not connect to the connect box.
Basically I would like to get a list (or similar) of the
values that was selected
Thanks
Shekhar
TIMAI2
July 29, 2024, 8:37pm
9
Not a dumb question
I attach a revised aia, that provides a button to return each substance and value in a list of lists (for visual appeal, displayed in a label)
sliders_Dynamic_Revised.aia (38.3 KB)
You should have noticed that I am applying random values for each substance on Generate. A list of values would be required if specific values are required.