I have a listbox in a GUI that I want to populate using enumerations. My class of enumerations might be something like
myenum.circlemyenum.squaremyenum.triangle
and I want the listbox to show
circlesquaretriangle
as options to select. Is there a way to use the enumeration labels in the listbox? The reason for doing this is so that if I edit the enum file, it will automatically change the next time I run the GUI. I have defined the enums in a file like this:|
classdef myenum < int32 enumeration Circle (0) Line (1) Square (2) end methods(Static) function y=addClassNameToEnumNames() y=true; end end end
Best Answer