06-15-2023 11:15 AM
Is it possible to have a type def enum on the Front Panel that only shows a couple of options instead of the entire enum? The work around is of course to have a limited FP enum then choose the appropriate option from the type def enum in a case statement. But curious if we can just do this in the properties of the control so that this little work around isn't required.
Example: DMM comes with many options, but you only wish to allow the user in your specific app to use RES and VOLT. It's an object situation.
06-15-2023 11:22 AM - last edited on 05-20-2024 06:45 PM by Content Cleaner
You can set the Disabled Items [] property:
All of the selections will be shown, but only the non-disabled ones can be selected by the user, the rest will be greyed out.
06-18-2023 01:30 AM
Instead of showing the enum, I would suggest showing a ring control and populating it dynamically. This will look better and will be easier for the user.
To do this, you can have an array of the allowed enum values, iterate over it and use Format Into String and the enum value to set the strings and values for the ring and after reading from the ring use Variant to Data to convert its value back to the enum. Or just set the strings and use the value of the ring with Index Array to get the value of the enum from the original array.