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!


Log in to reply
 

10
Online

550
Users

2.1k
Topics

16.1k
Posts