04-26-2007 07:01 PM
04-26-2007 10:43 PM
04-26-2007 11:38 PM
NO, you cannot show different items in an Enumerator at run-time.
There is a property called Strings for the Enum, but it is writable only at edit-time, not at run-time.
So, you dont have any way of altering the list displayed in an Enum for different levels of users, for example, Operator & Engineer.
But if you use Menu Ring, you can do so, because there exists a property called Strings & Strings And Values. You can write to these at run-time. If you use the 2nd property I ve mentioned, you can even alter the ring values for the corresponding items at run-time.
04-27-2007 08:11 AM
Is it possible to make only those three show up on the front panel when the enum is clicked? (Not greyed out, but a shorter list, supposing the user is easily confused by extra options...)
I missed this part of the post when I wrote my original reply. Parthabe is correct in that you cannot shorten the list and that you would need a text ring or menu ring in those cases.
But if it must be an enum, I think my solution would work for you. A greyed out list item really shouldn't confuse anyone. People should be used to seeing greyed out, unselectable items. You see such a thing all the time in any windows application.
04-27-2007 08:16 AM
Yes the two things that cant be done with enums are runtime changes and sparse numbers. The purpuse of an enum is for the developer not necessarly the user of the application. Enums are ways to create known sets to simplify programming. Being able to change this at runtime would cause program problems such as enums wired to a case structure, if you add a value your code would have unhandled cases. Unfortunatly you will have to use rings for the GUI.
04-27-2007 08:22 AM
... or have multiple enums controls and just show the one that applies at the moment.
Michael A from LAVA once wrote something to effect that the GUI should not dicate your data structures. So using a ring on the GUI and an enum behind the scenes may be the way to go.
Trying to help,