How do I retrieve the index of the currently selected list element?
Thank you.
box.Value();
this will retrieve the long value associated with the selection when you added the item to the box list
box.AddItem("Pizza",1); box.AddItem("Sushi",2); box.AddItem("Burger",3);
So above when you select by index you would send "2" for selecting the burger , but when you actually request the value of the selection it returns 3 , or the equivalent value set upon addition.
this will retrieve the long value associated with the selection when you added the item to the box list
So above when you select by index you would send "2" for selecting the burger , but when you actually request the value of the selection it returns 3 , or the equivalent value set upon addition.
Hi Lorentzos
Thank you for your solution.
Rob
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
How do I retrieve the index of the currently selected list element?
Thank you.