Combobox load image
-
Super many thanks -
and it stays in your family :-) -
@MikeB My pleasure :)
-
@Tania-Ghosh said in Combobox load image:
All credit goes to my brother @Rudra-Ghosh
The least he can do after he stole your account :)
-
@MikeB No need for a switch here, 2 lines are enough:
const var ComboBox1 = Content.getComponent("ComboBox1"); const var images = [Content.getComponent("Image1"), Content.getComponent("Image2"), Content.getComponent("Image3")]; inline function onComboBox1Control(component, value) { // Hide all for (img in images) img.showControl(false); // Show only the selected one images[value-1].showControl(true); }; Content.getComponent("ComboBox1").setControlCallback(onComboBox1Control);
-
@ustk said in Combobox load image:
@MikeB No need for a switch here, 2 lines are enough:
Why use 2 when you can use 1 :p
inline function onComboBox1Control(component, value) { for (i = 0; i < images.length; i++) images[i].showControl(i == value - 1); };
-
@d-healey One of these days I'll be able to do it with a half-line and then you'll kneel before me
-
-
@Christoph-Hart
Please !! Don't sayStole
I think she always keeps disturbing you. Asking silly things on HISE forum. I think it is more important to study than always ask for help/post on Forum. So what is the point for HISE a/c. That's why I locked her A/c.
Do you think she is learning? -
..................................... :)
-
Thanks guys and lady,
4 - 2 - 1
I am also always amazed. How many possibilities there are and what is the shortest.David inspires me again and again with his logically structured scripts - even if I don't always understand everything.
But I'm working on it :-)