hey Gareth,
if I remember correctly and in the case where the multi-selection flag is
not on, you can do something like this:

>>> values = ['red', 'orange', 'blue']
>>> formatted = list()
>>> [formatted.extend(x) for x in enumerate(values)]
['red', 0, 'orange', 1, 'blue', 2]
>>> values[listbox.Value]

no ?
-- jo



2012/10/26 Peter Agg <peter....@googlemail.com>

> I usually just do a quick python type thing:
>
> selected = box.Value
> boxList = box.UIItems
> boxList[ boxList.index(selected) - 1 ]
>
> That's presuming that each Label and Value entry are unique, of course.
>
>
> Pete
>
>
>
> On 26 October 2012 14:56, Gareth Bell <gareth.b...@primefocusworld.com>wrote:
>
>>  Afternoon all,****
>>
>> ** **
>>
>> So a combobox is derived from two values - the Label and the Value e.g. *
>> ***
>>
>> ** **
>>
>> box = ["Label1", "Value1", "Label2", "Value2"]****
>>
>> ** **
>>
>> Say I've selected "Label1"****
>>
>> ** **
>>
>> by using GetValue (box) the value it returns will be "Value1"****
>>
>> ** **
>>
>> Is it possible to get the label as a return value other than setting the
>> value to the same as the label?****
>>
>> ** **
>>
>
>

Reply via email to