Panel getItemText



  • This would be a useful function when using panels to create custom combo boxes.



  • Actually, if you're using a combobox type Panel, you'll probably have a array containing the items in the data object. In this case, you can write a simple function yourself:

    
    inline function getItemText(panel)
    {
        return panel.data.items[panel.getValue()];
    };
    

    I am not sure if adding a function to the API will be useful because as soon as you customise the data model, you're back on your own.



  • Good idea!


 

3
Online

410
Users

1.4k
Topics

9.9k
Posts