Jump to content

How do I open the right-click menu when I can't click the object?


Recommended Posts

If I have an object selected, is there any way I can open the menu for that object without having to actually click on the object? I'd try using that menu key on the keyboard that no one ever uses, but my keyboard doesn't have that key, and the equivalent Shift+F10 doesn't work. The reason I need this is because I have a frameless cluster control I created, and with no frame to click, the only place LabVIEW detects a click is inside the cluster, and it just opens the palette menu when I right-click there. The only other thing I can right-click is the label, and that doesn't give me the menu I need. I can select the cluster itself just fine by dragging a box around it, but the context menu seems to be the only place to use certain options, and I can't figure out how to open the context menu without a place to click.

If there is no shortcut to open the context menu on a selected item, is there a way to programmatically open the context menu on an object using its refnum? That way I could write a Quick Drop plugin to do it.

Link to comment

If Flarn does have a truly borderless cluster, then that means there is no edge to click on.  A while ago AQ posted a cluster with only one pixel on the top, and one pixel on the left in size.  With this cluster if you selected it by drawing the region as you suggested, then you still wouldn't be able to right click a border on the right or bottom because there wasn't one.

Sorry I do not know a way to invoke the right click menu, without right clicking it.

Link to comment

I mean I don't think there's a border. I didn't use any kind of hidden features or data editing trickery to make it, so if you didn't figure out how to make it completely borderless, maybe there is a pixel I can click. I'll check when I get home from work, and post the ctl.

Link to comment
 

The reason I need this is because I have a frameless cluster control I created

I'd be interested in a 1px border array and/or picture control if you're hacking them. The element separation on an array control is huge and annoying. Oooh. And a 0px separator or can make it transparent :):thumbup1:

Edited by ShaunR
Link to comment
 

I'd be interested in a 1px border array and/or picture control if you're hacking them. The element separation on an array control is huge and annoying. Oooh. And a 0px separator or can make it transparent :):thumbup1:

If @hooovahh's link doesn't suit your needs, I can take a look. I have a work-in-progress tool called VILab to do that kind of thing btw, though it's not quite usable yet (as in, most things just don't work at all). Until I finish that though, there's also my XML editing tool, in the same Github repo. It works by saving VI's to LabVIEW's undocumented XML save format, and lets you edit the raw data structures as XML. (Or Verbose Tagged Text, another format it supports that I think is easier to work with.) So you can try it yourself if you want, or again, I can try. It seems like the kind of thing I'd be able to do.

Link to comment
 

If @hooovahh's link doesn't suit your needs, I can take a look. I have a work-in-progress tool called VILab to do that kind of thing btw, though it's not quite usable yet (as in, most things just don't work at all). Until I finish that though, there's also my XML editing tool, in the same Github repo. It works by saving VI's to LabVIEW's undocumented XML save format, and lets you edit the raw data structures as XML. (Or Verbose Tagged Text, another format it supports that I think is easier to work with.) So you can try it yourself if you want, or again, I can try. It seems like the kind of thing I'd be able to do.

The picture control is just what I'm looking for (thanks Hooovahh). that eliminates the gap between elementstab1.png.f6049face5bb81945ca1832c446c2840.png

 

The array border and the splitter wouldmake it perfect ;)

tab2.png.4705d056e4461653251bed68888f5334.png

 

Edited by ShaunR
Link to comment

Well, I've attached some VI's with what I think are the splitter thing you're asking for, but it could be tricky to get it into a new VI for a similar problem to what I originally posted this thread about—except this time, while you don't need to open the context menu to copy/paste, you can't drag a box to copy a splitter, and also you can't put a splitter in a .ctl. (Well I actually managed to do so by hacking, but it didn't actually work to let you place it.) The only way I know of to copy the splitters out of these VI's are with scripting, using the "Move" method. Here you go though, in case you want to try. Oh, also, you can send me the VI you have and I'll probably be able to mod the splitters for you.

Can you describe in more detail what you wanted with the array?

Horiz Splitter.vi Vert Splitter.vi

  • Like 1
Link to comment
 

Well, I've attached some VI's with what I think are the splitter thing you're asking for, but it could be tricky to get it into a new VI for a similar problem to what I originally posted this thread about—except this time, while you don't need to open the context menu to copy/paste, you can't drag a box to copy a splitter, and also you can't put a splitter in a .ctl. (Well I actually managed to do so by hacking, but it didn't actually work to let you place it.) The only way I know of to copy the splitters out of these VI's are with scripting, using the "Move" method. Here you go though, in case you want to try. Oh, also, you can send me the VI you have and I'll probably be able to mod the splitters for you.

Can you describe in more detail what you wanted with the array?

Horiz Splitter.vi 4.87 kB · Vert Splitter.vi 4.86 kB ·

Many thanks. I thought that might be an issue. I can move it around using a property node (if I scan the FP objects to get a reference). Like you said. You can't select it (not that you can with the vanilla splitter either) which means you can't create property nodes either so scripting would be the only way of doing anything.

Is it possible to make it 1px in edit and 0 in run modes? I've no idea how these controls are put together but xcontrols can be different in run or edit.

Edited by ShaunR
Link to comment
 

IC. I'll have a play around with the XML now that you have shown me how to do it (many thanks). Maybe I'm just being a bit OCD about it but once/if it's done, I won't have to revisit it anytime soon.

I recommend selecting "Use Verbose Tagged Text" from the XML menu. Then it actually won't be XML you're editing, but something that's a lot easier to skim through.

 

Wait, also how do we copy these?  I used the invoke node Move, with Duplicate set to True, but the object it creates has a 2px size not 0px.

Odd. It worked when I tried it. What version of LabVIEW are you using?

Link to comment
 

Oh come on it was there in 2009...but I can't remember if there were functions or just shortcut support.  In either case in that thread I linked, I provided a way of invoking it through the Tools menu since most of the good shortcuts have been taken.

I know. You obviously didn't get the dig at a keyboard warrior vs a mouse clicky, coffee in hand, reclined on the sofa, coder layabout like me :D

Link to comment
  • 6 months later...

hooovahh or flarn2006, can you please show me how you were able to copy the 0px splitter? When I try it I just get a 2px one like hooovahh said at first, but I can't tell what I should be doing differently. I've tried setting the owner to be a pane and a panel but either way it copies as 2px.

This is amazing I love it so much, I reeeeally want to try using it!

Link to comment

Well I'm a bit confused.  When I made this post I know that I was able to copy the 0px splitter, but now that I'm attempting to I can't get it to work.  I'm in 2018 SP1 f4 now but doubt that extra patch level broke this feature and more likely I did something different then, or it copied it as 2px and I didn't realize it.  I think a more useful thing would be to have a VI that can turn a selection of splitters into 0px ones, or back into 2px ones.  This VI could be invoked on a VI and then it would make editing and positioning them a normal process.  But Flarn's magic eludes me.

Link to comment

I am working on a tool to make it easier to deal with panes and splitters (see the first version here: https://forums.ni.com/t5/Quick-Drop-Enthusiasts/Pane-Relief/gpm-p/3974152/highlight/true#M1105) and I really want to put a way to do 0px splitters into my tool.

If I could just be able to either replace an existing splitter with the 0px one programmatically, or copy the 0px one (and then just delete the old one and place it in the same spot), either way would work. Guess I'll have to wait for flarn or someone with equal magic to see if they can impart their amazing wisdom.

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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.