X___ Posted April 11, 2022 Report Share Posted April 11, 2022 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). Quote Link to comment
hooovahh Posted April 12, 2022 Report Share Posted April 12, 2022 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. Quote Link to comment
X___ Posted April 13, 2022 Author Report Share Posted April 13, 2022 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. Quote Link to comment
hooovahh Posted April 13, 2022 Report Share Posted April 13, 2022 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. Quote Link to comment
X___ Posted April 13, 2022 Author Report Share Posted April 13, 2022 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... Quote Link to comment
X___ Posted April 13, 2022 Author Report Share Posted April 13, 2022 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. 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.