Jump to content

Plot Legend Index Display Visibility Property Missing


X___

Recommended Posts

As the title says, you can show and hide the plot legend index display (it is an array after all) in Edit mode, but there is no property to do that programmatically.

Since the NXG style plot legend scrollbar is buggy (see this report and the linked thread), providing this index display as a backup for users to navigate the plot list in the absence of a mouse wheel, is not elegant has its visibility cannot be controlled (AFAIK).

Link to comment

Yes I've ran into this issue years ago.  My solution then was to recreate the functionality of the plot legend I wanted.  This was with an array of strings for the signal names, and a separate vertical scrollbar that I could control.  I also had a color selection control, and a checkbox for each signal name.  It was a real pain and in the end it wasn't worth the effort so I just told my users to remember to scroll up if they didn't see any signals (because I couldn't set the index on the plot legend).  I almost made it into an XControl but ugh it was a pain.  Maybe a QControl would be better.

Link to comment

At this point I am just showing the index display at all times and hiding it with a disabled button whenever I don't need it.

I am not expecting this to be fixed before 2030 and since I am not planning to upgrade to 2022 and later, that will be it.

Link to comment

Yeah one thing I wanted to do was only show it when the number of signals were greater than the number of rows shown.  If I have room for 4 signals but only 3 were selected to be graphed, I figured I could hide the scrollbar.  But that isn't true if the user scrolled down previously.  A pain for sure.  Always showing it at least never leaves the user being stuck.  Oh turns out I did actually post my code that attempted to do graph and selection of signals differently here, with a youtube demonstration.

 

Link to comment

Another interesting tidbit about the Index Display is that if you edit its Description and Tip, the Tip does show up as expected when hovering over the index (and its description in the Help window), but if you have not set a Description for the array itself, that index's description will show up for the whole array (but not the index's tip).

Define both Description and Tip for the array AND its index, and things work as expected.

It's tough to write code that does behave properly in all cases...

Link to comment
4 hours ago, hooovahh said:

Yeah one thing I wanted to do was only show it when the number of signals were greater than the number of rows shown.  If I have room for 4 signals but only 3 were selected to be graphed, I figured I could hide the scrollbar.  But that isn't true if the user scrolled down previously.  A pain for sure.  Always showing it at least never leaves the user being stuck.  Oh turns out I did actually post my code that attempted to do graph and selection of signals differently here, with a youtube demonstration.

 

I am certainly not going to rewrite a Plot Legend, as there are so many functionalities I am relying on (however buggy they are), that this would be way too much work.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.