How can I add new values to the Enum

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How can I add new values to the Enum

Robert Unguran
Hi,

I have a drop-down list:

lidar_list = Enum( "Select One" )

and I would like to insert new elements, how can I do that? Is there a
possibility?
For example

self.lidar_list.append("Choose me")

All the best,
Robert


_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: How can I add new values to the Enum

Fred
Le 26/11/2012 12:51, Robert Unguran a écrit :

> Hi,
>
> I have a drop-down list:
>
> lidar_list = Enum( "Select One" )
>
> and I would like to insert new elements, how can I do that? Is there a
> possibility?
> For example
>
> self.lidar_list.append("Choose me")

lidar_curr = String('Select One')
lidar_list = List(['a', 'b', 'c'])

view = View(Item('lidar_curr',
             editor=EnumEditor(name='lidar_list'))

Thus, you can add/delete items to lidar_list as usual.


HTH


Cheers,

--
Fred
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev