lvb Posted July 26, 2006 Report Share Posted July 26, 2006 I would like to create a control that has Enum data type, but looks like this (menu ring): The Enum does not have a drop-down arrow for the user to realize more options are available, and I find the Menu Ring control more clear. Is this possible? Thanks! Quote Link to comment
LAVA 1.0 Content Posted July 26, 2006 Report Share Posted July 26, 2006 I would like to create a control that has Enum data type, but looks like this (menu ring): The Enum does not have a drop-down arrow for the user to realize more options are available, and I find the Menu Ring control more clear. Is this possible? Thanks! Use enum under Controls->System->Enum. You can also select the enum control on a block diagram and then select customize control from the Edit menu and then press the wrench icon to be able to edit the look and feel of the control. Quote Link to comment
Michael Aivaliotis Posted July 26, 2006 Report Share Posted July 26, 2006 This could be a little tricky because the enum control doesn't have an equivalent selector object. It only has an increment decrement. The selector equivalent is the entire text field. Pasting a down arrow there will replace the text field and is messy. I would suggest, instead to decouple the GUI requirements from the diagram data requirements as indicated in the image. This way you can use whatever you like as a control and still get the benefits of enum datatypes on the diagram. Quote Link to comment
lvb Posted July 27, 2006 Author Report Share Posted July 27, 2006 This could be a little tricky because the enum control doesn't have an equivalent selector object. It only has an increment decrement. The selector equivalent is the entire text field. Pasting a down arrow there will replace the text field and is messy.I would suggest, instead to decouple the GUI requirements from the diagram data requirements as indicated in the image. This way you can use whatever you like as a control and still get the benefits of enum datatypes on the diagram. Excellent! This actually solves a readability issue with all of the LabVIEW programs that I have inherited. Now I can go through all of the case structures and replace mystery numbers with descriptive text. Thank you for the great tip! Quote Link to comment
Mark Balla Posted July 27, 2006 Report Share Posted July 27, 2006 I would like to create a control that has Enum data type, but looks like this (menu ring): The Enum does not have a drop-down arrow for the user to realize more options are available, and I find the Menu Ring control more clear. Is this possible? Thanks! With a little graphics manipulation using the control editor it's not that hard. First open the menu ring in the control editor and switch to the tweezer tool. Copy the rounded back decoration to the clipboard. Close and open the Enum in the icon editor and switch to tweezer. Make the text background transparent and replace the border with the clipboard Item. Download File:post-584-1153972571.vi Now do the same steps with the little triangle and you have a custom enum. Quote Link to comment
Jim Kring Posted August 18, 2006 Report Share Posted August 18, 2006 This could be a little tricky because the enum control doesn't have an equivalent selector object. It only has an increment decrement. The selector equivalent is the entire text field. Pasting a down arrow there will replace the text field and is messy.I would suggest, instead to decouple the GUI requirements from the diagram data requirements as indicated in the image. This way you can use whatever you like as a control and still get the benefits of enum datatypes on the diagram. I recommend always using the Variant to Data function, in order to perform normal numeric coercion to and from the enum data type. If you use the Type Cast function and your numeric representations don't match, then you will not alway get what you expect. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.