I am working on a live script and want to populate a drop down list with data from an Excel workbook, The data consists of two colums - names of acids and their pKa values. I can import the data as a table and from that can get column vectors. The drop down needs to display the names of the acids and their pKa values.
Am I right in thinking that it is not possible for the drop down to display two columns?
Assuming it is not possible, I am constructing a column vector containing the names of the acids with their pKa values in parentheses. I am doing this in a for ... end loop (see attached script) but is there a better/faster way of doing it?
The drop down is working nicely but I cannot change the width of the control (not the list) which looks like this . This is a potential deal breaker. However, if I can overcome that problem, there is a further hurdle to clear. When the selection is changed I want to be able to store the pKa value of the selected item to a variable for use further down.
It does not seem possible, further down the script, to refer to the drop down or its selected value because the drop down does not have a name which can be used to reference it.