I need to build a dynamic list of Enums, where each element of the list should contain the same reference Enum. Then the user can choose the value from the Enum. Here is my code:
class EnumListContainer(HasTraits):
values = ['a', 'b', 'c']
enum_list = List(Enum(values))
elc = EnumListContainer()
elc.configure_traits()
It runs fine and shows what I need except that I do not know the content of values in advance. How should I update that simple code to be able to pass a list at run time? I have tried a few things but I don't seem to be getting anywhere.
Thanks A.