Re: PyQtForSoftimage: typing in an 'editable' combobox seems to be passed on to Softimage shortcuts?

2013-05-06 Thread philipp.oeser
Yep, that's cooperating :)
I've already gone another route but still good to know.

I've put your findings on the github issue as well (hope you dont mind)

Greetz
Philipp


> Simon Anderson  hat am 6. Mai 2013 um 15:21
> geschrieben:
> 
>  just did a test and it seems that if you have a blank combo box it doesn't
> work, but when there are a few items in it, it seems to work correctly once
> the combo box has been selected.
>  using the standard released build.
> 
>  give it a try and let me know if it still doesn't co-operate.
> 
>  My thought is that if you don't delegate a string item it doesn't know what
> is meant to be in the QCombox, that is why keyboard input doesn't work.
>  Cheers
> 
>  from PyQt4 import QtGui, QtCore
>  import sip
>  si = Application
>  sianchor = sip.wrapinstance(long(si.getQtSoftimageAnchor()), QtGui.QWidget)
> 
>  dialog = QtGui.QMainWindow(sianchor)
>  uiComboBox = QtGui.QComboBox(parent=dialog)
>  uiComboBox.setFocusPolicy(QtCore.Qt.StrongFocus)
>  uiComboBox.setEditable(True)
>  uiComboBox.addItem("test")
>  uiComboBox.addItem("zzz")
>  dialog.show()
> 
> 
>  On Mon, May 6, 2013 at 9:53 PM, philipp.oeser   > wrote:
>> >Yes, this also fails with the mouse over the gui...
> > 
> >opened an issue on
> > github:
> > 
> >Greetz
> >Philipp
> > 
> >P.S.: thanx cesar for putting up that code snippet
> > 
> > 
> > > > > Steven Caron < car...@gmail.com  > hat am
> > > > > 4. Mai 2013 um 01:18 geschrieben:
> > > 
> > > i don't have time to look at this right now but can you make sure your
> > > mouse is over the gui when you attempt this?
> > > 
> > > 
> > > On Fri, May 3, 2013 at 4:12 PM, César Sáez  > >  > wrote:
> > >   > > > >   Yep, I can confirm it isnt working even with strong
> > >   > > > > focus.
> > > >   Here's a snippet anyone can run from script editor to test it
> > > > out...
> > > > 
> > > >   from PyQt4 import QtGui, QtCore
> > > >   import sip
> > > >   si = Application
> > > >   sianchor = sip.wrapinstance(long(si.getQtSoftimageAnchor()),
> > > > QtGui.QWidget)
> > > > 
> > > >   dialog = QtGui.QMainWindow(sianchor)
> > > >   uiComboBox = QtGui.QComboBox(parent=dialog)
> > > >   uiComboBox.setFocusPolicy(QtCore.Qt.StrongFocus)
> > > >   uiComboBox.setEditable(True)
> > > >   dialog.show()
> > > > 
> > > > 
> > > >   On Fri, May 3, 2013 at 4:52 AM, philipp.oeser
> > > > mailto:philipp.oe...@nhb.de> > wrote:
> > > > > > > > > 
> > > > > If someone else can confirm (Enrique?, Simon?), I will submit
> > > > > an issue on github...
> > > > > I can also put together a minimal Plugin that reproduces this.
> > > > > 
> > > > >   > > > > > > > 
> > >> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> >[nhb]
> > Philipp Oeser
> > Pipeline Engineer
> > T   +49 40 - 450 120 - 401 
> > 
> > www.nhb.de 
> > 
> > 
> >nhb video GmbH | nhb ton GmbH
> > 
> >Alsterglacis 8 | 20354 Hamburg
> > 
> > nhb video GmbH, HRB 61617
> >Geschäftsführer: Michael Vitzthum, Matthias Rewig
> >nhb ton GmbH, HRB 73877
> >Geschäftsführer: Michael Vitzthum, Matthias Rewig
> > [dolby]nhb is Dolby approved
> > Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte
> > Informationen. Das unerlaubte Weiterleiten dieser Mail ist nicht gestattet.
> > This e-mail may contain confidential and/or privileged information. Any
> > unauthorised disclosure of the material in this e-mail is forbidden.
> >  > 
> 
> 
>  --
>  ---
>  Simon Ben Anderson
>  blog:
> 
















































[nhb]
Philipp Oeser
Pipeline Engineer
T   +49 40 - 450 120 - 401
www.nhb.de 


nhb video GmbH | nhb ton GmbH

Alsterglacis 8 | 20354 Hamburg

nhb video GmbH, HRB 61617
Geschäftsführer: Michael Vitzthum, Matthias Rewig
nhb ton GmbH, HRB 73877
Geschäftsführer: Michael Vitzthum, Matthias Rewig
[dolby]nhb is Dolby approved
Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte
Informationen. Das unerlaubte Weiterleiten dieser Mail ist nicht gestattet. This
e-mail may contain confidential and/or privileged information. Any unauthorised
disclosure of the material in this e-mail is forbidden.

Re: PyQtForSoftimage: typing in an 'editable' combobox seems to be passed on to Softimage shortcuts?

2013-05-06 Thread Simon Anderson
just did a test and it seems that if you have a blank combo box it doesn't
work, but when there are a few items in it, it seems to work correctly once
the combo box has been selected.
using the standard released build.

give it a try and let me know if it still doesn't co-operate.

My thought is that if you don't delegate a string item it doesn't know what
is meant to be in the QCombox, that is why keyboard input doesn't work.

Cheers

from PyQt4 import QtGui, QtCore
import sip
si = Application
sianchor = sip.wrapinstance(long(si.getQtSoftimageAnchor()), QtGui.QWidget)

dialog = QtGui.QMainWindow(sianchor)
uiComboBox = QtGui.QComboBox(parent=dialog)
uiComboBox.setFocusPolicy(QtCore.Qt.StrongFocus)
uiComboBox.setEditable(True)
uiComboBox.addItem("test")
uiComboBox.addItem("zzz")
dialog.show()


On Mon, May 6, 2013 at 9:53 PM, philipp.oeser  wrote:

> **
>  Yes, this also fails with the mouse over the gui...
>
>  opened an issue on github:
>  https://github.com/caron/PyQtForSoftimage/issues/11
>
>  Greetz
>  Philipp
>
>  P.S.: thanx cesar for putting up that code snippet
>
>
> Steven Caron  hat am 4. Mai 2013 um 01:18 geschrieben:
>
>  i don't have time to look at this right now but can you make sure your
> mouse is over the gui when you attempt this?
>
>
>  On Fri, May 3, 2013 at 4:12 PM, César Sáez  wrote:
>
>  Yep, I can confirm it isnt working even with strong focus.
> Here's a snippet anyone can run from script editor to test it out...
>
>  from PyQt4 import QtGui, QtCore
>  import sip
>  si = Application
>  sianchor = sip.wrapinstance(long(si.getQtSoftimageAnchor()),
> QtGui.QWidget)
>
>  dialog = QtGui.QMainWindow(sianchor)
>  uiComboBox = QtGui.QComboBox(parent=dialog)
>  uiComboBox.setFocusPolicy(QtCore.Qt.StrongFocus)
>  uiComboBox.setEditable(True)
>  dialog.show()
>
>
>  On Fri, May 3, 2013 at 4:52 AM, philipp.oeser wrote:
>
>
>  If someone else can confirm (Enrique?, Simon?), I will submit an issue on
> github...
>  I can also put together a minimal Plugin that reproduces this.
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> [image: nhb] Philipp Oeser Pipeline Engineer T+49 40 - 450 120 - 401
> www.nhb.de
>
> nhb video GmbH | nhb ton GmbH
>
> Alsterglacis 8 | 20354 Hamburg
>  nhb video GmbH, HRB 61617
> Geschäftsführer: Michael Vitzthum, Matthias Rewig
> nhb ton GmbH, HRB 73877
> Geschäftsführer: Michael Vitzthum, Matthias Rewig [image: dolby]nhb is
> Dolby approved Diese E-Mail enthält vertrauliche und/oder rechtlich
> geschützte Informationen. Das unerlaubte Weiterleiten dieser Mail ist nicht
> gestattet. This e-mail may contain confidential and/or privileged
> information. Any unauthorised disclosure of the material in this e-mail is
> forbidden.
>



-- 
---
Simon Ben Anderson
blog: http://vinyldevelopment.wordpress.com/


Re: PyQtForSoftimage: typing in an 'editable' combobox seems to be passed on to Softimage shortcuts?

2013-05-06 Thread philipp.oeser
Yes, this also fails with the mouse over the gui...

opened an issue on github:
https://github.com/caron/PyQtForSoftimage/issues/11

Greetz
Philipp

P.S.: thanx cesar for putting up that code snippet


> Steven Caron  hat am 4. Mai 2013 um 01:18 geschrieben:
> 
>  i don't have time to look at this right now but can you make sure your mouse
> is over the gui when you attempt this?
> 
> 
>  On Fri, May 3, 2013 at 4:12 PM, César Sáez   > wrote:
>> >Yep, I can confirm it isnt working even with strong focus.
> >Here's a snippet anyone can run from script editor to test it out...
> > 
> >from PyQt4 import QtGui, QtCore
> >import sip
> >si = Application
> >sianchor = sip.wrapinstance(long(si.getQtSoftimageAnchor()),
> > QtGui.QWidget)
> > 
> >dialog = QtGui.QMainWindow(sianchor)
> >uiComboBox = QtGui.QComboBox(parent=dialog)
> >uiComboBox.setFocusPolicy(QtCore.Qt.StrongFocus)
> >uiComboBox.setEditable(True)
> >dialog.show()
> > 
> > 
> >On Fri, May 3, 2013 at 4:52 AM, philipp.oeser  >  > wrote:
> >  > > > 
> > >  If someone else can confirm (Enrique?, Simon?), I will submit an
> > > issue on github...
> > >  I can also put together a minimal Plugin that reproduces this.
> > > 
> > >> >  > 
















































[nhb]
Philipp Oeser
Pipeline Engineer
T   +49 40 - 450 120 - 401
www.nhb.de 


nhb video GmbH | nhb ton GmbH

Alsterglacis 8 | 20354 Hamburg

nhb video GmbH, HRB 61617
Geschäftsführer: Michael Vitzthum, Matthias Rewig
nhb ton GmbH, HRB 73877
Geschäftsführer: Michael Vitzthum, Matthias Rewig
[dolby]nhb is Dolby approved
Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte
Informationen. Das unerlaubte Weiterleiten dieser Mail ist nicht gestattet. This
e-mail may contain confidential and/or privileged information. Any unauthorised
disclosure of the material in this e-mail is forbidden.

Re: PyQtForSoftimage: typing in an 'editable' combobox seems to be passed on to Softimage shortcuts?

2013-05-03 Thread Steven Caron
i don't have time to look at this right now but can you make sure your
mouse is over the gui when you attempt this?


On Fri, May 3, 2013 at 4:12 PM, César Sáez  wrote:

> Yep, I can confirm it isnt working even with strong focus.
> Here's a snippet anyone can run from script editor to test it out...
>
> from PyQt4 import QtGui, QtCore
> import sip
> si = Application
> sianchor = sip.wrapinstance(long(si.getQtSoftimageAnchor()), QtGui.QWidget)
>
> dialog = QtGui.QMainWindow(sianchor)
> uiComboBox = QtGui.QComboBox(parent=dialog)
> uiComboBox.setFocusPolicy(QtCore.Qt.StrongFocus)
> uiComboBox.setEditable(True)
> dialog.show()
>
>
> On Fri, May 3, 2013 at 4:52 AM, philipp.oeser wrote:
>
>> **
>>
>>  If someone else can confirm (Enrique?, Simon?), I will submit an issue
>> on github...
>>  I can also put together a minimal Plugin that reproduces this.
>>
>>


Re: PyQtForSoftimage: typing in an 'editable' combobox seems to be passed on to Softimage shortcuts?

2013-05-03 Thread César Sáez
Yep, I can confirm it isnt working even with strong focus.
Here's a snippet anyone can run from script editor to test it out...

from PyQt4 import QtGui, QtCore
import sip
si = Application
sianchor = sip.wrapinstance(long(si.getQtSoftimageAnchor()), QtGui.QWidget)

dialog = QtGui.QMainWindow(sianchor)
uiComboBox = QtGui.QComboBox(parent=dialog)
uiComboBox.setFocusPolicy(QtCore.Qt.StrongFocus)
uiComboBox.setEditable(True)
dialog.show()


On Fri, May 3, 2013 at 4:52 AM, philipp.oeser  wrote:

> **
>
>  If someone else can confirm (Enrique?, Simon?), I will submit an issue on
> github...
>  I can also put together a minimal Plugin that reproduces this.
>
>


Re: PyQtForSoftimage: typing in an 'editable' combobox seems to be passed on to Softimage shortcuts?

2013-05-03 Thread philipp.oeser
Hi there,

thanx for your answers. However, for me this still persists (also with STRONG
focus policy...)

here is the widgets part of the .ui file:

  
   

 760
 20
 69
 22

   
   
Qt::StrongFocus
   
   
true
   
  


If someone else can confirm (Enrique?, Simon?), I will submit an issue on
github...
I can also put together a minimal Plugin that reproduces this.

Greetz
Philipp



> Enrique Caballero  hat am 3. Mai 2013 um 04:00
> geschrieben:
> 
>  hmm it seems to me that you just have to set the keyboard focus to STRONG on
> your QComboBox
> 
>  I've used Pyqt for Softimage very heavily for 2 years now and have never run
> into this issue.
> 
> 
>  On Fri, May 3, 2013 at 7:41 AM, Steven Caron   > wrote:
>> >yes, but please make sure to use the github issues to get this
>> > tracked. i am all for continuing the conversation here and everyone
>> > sharing their experience here. but i will certainly forget if i don't
>> > have it logged somewhere.
> > 
> >thanks everyone for continuing to push the plugin. it makes jo and me
> > happy :)
> > 
> >s
> > 
> > 
> >On Thu, May 2, 2013 at 4:25 PM, Simon Anderson
> > mailto:simonbenandersonl...@gmail.com> >
> > wrote:
> >  > > >  Havent had that happen either, will do a test this evening.
> >  > > > Im running a custom build at the moment at home(same code just
> >  > > > built with a newer version of python and Qt), but will check it
> >  > > > out and let you know if im having the same error.
> > > 
> > > 
> > >  On Fri, May 3, 2013 at 3:44 AM, Steven Caron  > >  > wrote:
> > >> > > >i have not noticed this... could you log and issue
> > >> > > > on the github page with some sample code?
> > > > 
> > > >s
> > > > 
> > > > 
> > > >On Thu, May 2, 2013 at 9:30 AM, philipp.oeser
> > > > mailto:philipp.oe...@nhb.de> > wrote:
> > > >  > > > > >  Hi list,
> > > > > 
> > > > >  I stumbled over this today:
> > > > >  when you have an "editable" QComboBox and start typing, the
> > > > > events/letters seem to be passed on to Softimage.
> > > > >  This results in keyboard shortcuts being performed in
> > > > > Softimage instead of text being written in the QComboBox...
> > > > >  Not sure if this is the only widget where that happens (it's
> > > > > the first that I noticed).
> > > > > 
> > > > >  Is this a known issue? Any workarounds?
> > > > > 
> > > > >  Greetz
> > > > >  Philipp
> > > > > 
> > > > >  P.S.: still using PyQtForSoftimage_beta5.xsiaddon from
> > > > > 05/02/2013
> > > > >> > > >  > > > 
> > > 
> > > 
> > >  --
> > >  ---
> > >  Simon Ben Anderson
> > >  blog:
> > >> >  > 
















































[nhb]
Philipp Oeser
Pipeline Engineer
T   +49 40 - 450 120 - 401
www.nhb.de 


nhb video GmbH | nhb ton GmbH

Alsterglacis 8 | 20354 Hamburg

nhb video GmbH, HRB 61617
Geschäftsführer: Michael Vitzthum, Matthias Rewig
nhb ton GmbH, HRB 73877
Geschäftsführer: Michael Vitzthum, Matthias Rewig
[dolby]nhb is Dolby approved
Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte
Informationen. Das unerlaubte Weiterleiten dieser Mail ist nicht gestattet. This
e-mail may contain confidential and/or privileged information. Any unauthorised
disclosure of the material in this e-mail is forbidden.

Re: PyQtForSoftimage: typing in an 'editable' combobox seems to be passed on to Softimage shortcuts?

2013-05-02 Thread Enrique Caballero
hmm it seems to me that you just have to set the keyboard focus to STRONG
on your QComboBox

I've used Pyqt for Softimage very heavily for 2 years now and have never
run into this issue.


On Fri, May 3, 2013 at 7:41 AM, Steven Caron  wrote:

> yes, but please make sure to use the github issues to get this tracked. i
> am all for continuing the conversation here and everyone sharing their
> experience here. but i will certainly forget if i don't have it logged
> somewhere.
>
> thanks everyone for continuing to push the plugin. it makes jo and me
> happy :)
>
> s
>
>
> On Thu, May 2, 2013 at 4:25 PM, Simon Anderson <
> simonbenandersonl...@gmail.com> wrote:
>
>> Havent had that happen either, will do a test this evening. Im running a
>> custom build at the moment at home(same code just built with a newer
>> version of python and Qt), but will check it out and let you know if im
>> having the same error.
>>
>>
>>
>> On Fri, May 3, 2013 at 3:44 AM, Steven Caron  wrote:
>>
>>> i have not noticed this... could you log and issue on the github page
>>> with some sample code?
>>>
>>> s
>>>
>>>
>>> On Thu, May 2, 2013 at 9:30 AM, philipp.oeser wrote:
>>>
 **
  Hi list,

  I stumbled over this today:
  when you have an "editable" QComboBox and start typing, the
 events/letters seem to be passed on to Softimage.
  This results in keyboard shortcuts being performed in Softimage
 instead of text being written in the QComboBox...
  Not sure if this is the only widget where that happens (it's the first
 that I noticed).

  Is this a known issue? Any workarounds?

  Greetz
  Philipp

  P.S.: still using PyQtForSoftimage_beta5.xsiaddon from 05/02/2013

>>>
>>>
>>
>>
>> --
>> ---
>> Simon Ben Anderson
>> blog: http://vinyldevelopment.wordpress.com/
>>
>
>


Re: PyQtForSoftimage: typing in an 'editable' combobox seems to be passed on to Softimage shortcuts?

2013-05-02 Thread Steven Caron
yes, but please make sure to use the github issues to get this tracked. i
am all for continuing the conversation here and everyone sharing their
experience here. but i will certainly forget if i don't have it logged
somewhere.

thanks everyone for continuing to push the plugin. it makes jo and me happy
:)

s


On Thu, May 2, 2013 at 4:25 PM, Simon Anderson <
simonbenandersonl...@gmail.com> wrote:

> Havent had that happen either, will do a test this evening. Im running a
> custom build at the moment at home(same code just built with a newer
> version of python and Qt), but will check it out and let you know if im
> having the same error.
>
>
>
> On Fri, May 3, 2013 at 3:44 AM, Steven Caron  wrote:
>
>> i have not noticed this... could you log and issue on the github page
>> with some sample code?
>>
>> s
>>
>>
>> On Thu, May 2, 2013 at 9:30 AM, philipp.oeser wrote:
>>
>>> **
>>>  Hi list,
>>>
>>>  I stumbled over this today:
>>>  when you have an "editable" QComboBox and start typing, the
>>> events/letters seem to be passed on to Softimage.
>>>  This results in keyboard shortcuts being performed in Softimage instead
>>> of text being written in the QComboBox...
>>>  Not sure if this is the only widget where that happens (it's the first
>>> that I noticed).
>>>
>>>  Is this a known issue? Any workarounds?
>>>
>>>  Greetz
>>>  Philipp
>>>
>>>  P.S.: still using PyQtForSoftimage_beta5.xsiaddon from 05/02/2013
>>>
>>
>>
>
>
> --
> ---
> Simon Ben Anderson
> blog: http://vinyldevelopment.wordpress.com/
>


Re: PyQtForSoftimage: typing in an 'editable' combobox seems to be passed on to Softimage shortcuts?

2013-05-02 Thread Simon Anderson
Havent had that happen either, will do a test this evening. Im running a
custom build at the moment at home(same code just built with a newer
version of python and Qt), but will check it out and let you know if im
having the same error.



On Fri, May 3, 2013 at 3:44 AM, Steven Caron  wrote:

> i have not noticed this... could you log and issue on the github page with
> some sample code?
>
> s
>
>
> On Thu, May 2, 2013 at 9:30 AM, philipp.oeser wrote:
>
>> **
>>  Hi list,
>>
>>  I stumbled over this today:
>>  when you have an "editable" QComboBox and start typing, the
>> events/letters seem to be passed on to Softimage.
>>  This results in keyboard shortcuts being performed in Softimage instead
>> of text being written in the QComboBox...
>>  Not sure if this is the only widget where that happens (it's the first
>> that I noticed).
>>
>>  Is this a known issue? Any workarounds?
>>
>>  Greetz
>>  Philipp
>>
>>  P.S.: still using PyQtForSoftimage_beta5.xsiaddon from 05/02/2013
>>
>
>


-- 
---
Simon Ben Anderson
blog: http://vinyldevelopment.wordpress.com/


Re: PyQtForSoftimage: typing in an 'editable' combobox seems to be passed on to Softimage shortcuts?

2013-05-02 Thread Steven Caron
i have not noticed this... could you log and issue on the github page with
some sample code?

s


On Thu, May 2, 2013 at 9:30 AM, philipp.oeser  wrote:

> **
>  Hi list,
>
>  I stumbled over this today:
>  when you have an "editable" QComboBox and start typing, the
> events/letters seem to be passed on to Softimage.
>  This results in keyboard shortcuts being performed in Softimage instead
> of text being written in the QComboBox...
>  Not sure if this is the only widget where that happens (it's the first
> that I noticed).
>
>  Is this a known issue? Any workarounds?
>
>  Greetz
>  Philipp
>
>  P.S.: still using PyQtForSoftimage_beta5.xsiaddon from 05/02/2013
>


PyQtForSoftimage: typing in an 'editable' combobox seems to be passed on to Softimage shortcuts?

2013-05-02 Thread philipp.oeser
Hi list,

I stumbled over this today:
when you have an "editable" QComboBox and start typing, the events/letters seem
to be passed on to Softimage.
This results in keyboard shortcuts being performed in Softimage instead of text
being written in the QComboBox...
Not sure if this is the only widget where that happens (it's the first that I
noticed).

Is this a known issue? Any workarounds?

Greetz
Philipp

P.S.: still using PyQtForSoftimage_beta5.xsiaddon from 05/02/2013

Re: combobox

2012-10-26 Thread jo benayoun
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 

> 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 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?
>>
>> ** **
>>
>
>


Re: combobox

2012-10-26 Thread Peter Agg
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 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?
>
> ** **
>


combobox

2012-10-26 Thread Gareth Bell
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?