LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
PJM_Labview

Allow to add comment in the control editor that are only visible in the control editor

Status: New

There is a need to have the capabilities to make comment about a type def/strict type def control (in the control editor) that are only visible in the control editor.

 

Control Editor Comment.png

 

For instance you might want to point to the person editing the control that he/she should not rename that particular cluster element or this will brake the code (and you may want to use an arrow pointing to the element along with some text).

 

Currently, if you do that the comment become part of the control and is visible for every front panel instance. This bring absolutely nothing to be able to see that type of comment on the FP and it should not be seen by the user of the control (because this actually make the type def so large an unwieldy).

 

Therefore, there should be a need to select a group of decorations and mark them has only visible in the control editor .

 

Note: Right now the only way to achieve something similar to what I describe, is to put the comment in the control description, but this is no great because:

 

  1. People tend to not expect control to have VI description.
  2. This does not allow to use arrow and such to directly point  to a specific part of a control.

 

PJM



  


vipm.io | jki.net

6 Comments
JackDunaway
Trusted Enthusiast
I think the control should simply show the Description in Context Help when you hover over the typedef. Let's get used to controls having a description! The idea of having arrows pointing to specific elements in a cluster is not very robust - different fonts on different platforms skew each element by a couple of pixels, and the end result is that at the end of a large typedef, you will have the arrow pointing to the completely wrong element. We have multi-developers on different platforms, and having different environment fonts commonly bites us in terms of BD and FP alignment.
altenbach
Knight of NI
Maybe we can re-use the idea of "active region" as suggested here, and also allow a similar thing for the control editor: Anything outside the marked area is only visible in the control editor.
JMota
Active Participant

I was thinking on making this exact same suggestion. I personally like the idea of having a right-click option on the comment to say I don't want this to be part of the instances of the typedef/control, but having a dedicated region where I can put comments would work too. I thought about using the Control description, but that's not nearly as good as a comment next to the actual type definition.

 

If anyone needs this ability very badly, a workaround that a co-worker just told me about is the following:

 

"You could make an image that contains your comments and set the image as the wallpaper of the typedef's panel. Right-click on the typedef's scrollbar and select Properties. Go to the Background section, click the Browse button and choose your image.
Unfortunately, the alignment grid shows up on top of the image. A workaround for that might be setting the typedef's grid size to be very large."

 

EvgenKo423
Member

Here is another lifehack:

After placing a comment in a Control Editor you can select it and then click Reorder > Move To Back on a toolbar. After that a comment will be selectable independently from the rest of a control, so after placing your control on a FP you can just select a comment and delete it! 😏

(it won't work for Strict Typedefs though...)

wiebe@CARYA
Knight of NI

>After placing a comment in a Control Editor you can select it and then click Reorder > Move To Back on a toolbar. After that a comment will be selectable independently from the rest of a control, so after placing your control on a FP you can just select a comment and delete it! 

 

Doesn't work for me in LV13 nor LV18... Selecting the comment will still select the entire control.

EvgenKo423
Member

I'm sorry, I was experimenting with that a while ago and I remember it was a bit hacky...

 

Move To Back method works only for some controls (e.g. Combo Box'es I was checking on). There is another way of doing so I initially intended to share, but I didn't find it yesterday on a Combo Box I was checking with.


So, first of all, a disclaimer:

To make it work you will have to place a hidden INI key (enableSecretPopups=True) into your LabVIEW.ini file. It will extend the features of your Control Editor with those used by NI to create Silver controls.

Considering that lots of people use the products of these features (Silver controls) in their VIs, it can be considered safe to use, if used wisely. However, these features are unofficial and incomplete. You use them at your own risk and you will not get support from NI for any issues caused by the use of these features!


So, after you've enabled these features:

  1. Open any Control or Typedef in a Control Editor and place a comment;
  2. Switch the editor into a Customize Mode (a wrench icon on a toolbox);
  3. Right-click a comment and you will see a lot of options;
  4. Configure it as seen on a picture below:
    image.png
    Note: After selecting Slave to Frame mask options will change, so you will have to configure them yourself;
  5. Switch the editor back into an Edit Mode;
  6. Apply changes.
    Note 1: Changing these options will not mark a control as changed. To be able to apply changes move a control back and forth.
    Note 2: Typedefs do not propagate cosmetic changes to its instances. To apply these changes to instances of existing Typedefs you'll have to change them to Strict Typedef, apply changes, change back to Typedef and apply changes again.
    (however, you'll need this only for testing purposes; you don't wanna bring this comment to your Typedef instances, don't you?)
    Note 3: Generally when using these additional features I wasn't able to apply some changes to Controls through the option of the same name in a File menu. However, they were propagated by using a control replacement dialog after pressing a Close button and then cancelling the close action.

This method works for any control (I hope) and regardless of comment order.


Here is a demo VI (can't attach it, sorry). Both of these methods work for me in LabVIEW 2018 SP1.

However, the later one can cause issues to some controls after moving/deleting a comment (see Combo Box Broken!; it's the only control I had issues with, though...).