Skip to main content
Mar 18, 2019 8:46 AM UTC
Question

setting a property value upon clicking of buttons

I have around 14 buttons with each button having different values. Upon clicking on any of the 14 buttons, i wish to set a property value. Normally, here i'm having to call 14 setProperty services of a thing. But, i wish to simplify the process. Any suggestions??

7 replies

Mar 18, 2019 10:09 AM UTC

So you just have 1 property but you have 14 values (also buttons) for option, when you press 1 button, the property will be assigned the value it represents?

 

You could use Radio Button or something like a 14 rows List widget, and assign the selected value to the property

muzzammilAuthor
Mar 27, 2019 7:50 AM UTC

@zyuan1 Can you elaborate your sayings??

Mar 27, 2019 8:44 AM UTC

You can drag a Radio Button widget (in latest version it's called Button Bar widget), they are quite self-explanatory.