Jump to content
flarn2006

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.

Share this post


Link to post
Share on other sites

I've gotten around this by selecting a region containing the control and then right-clicking on that.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Yes, I am assuming there is one pixel. Never found a way to create an actual borderless cluster with LabVIEW.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
 

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

Share this post


Link to post
Share on other sites
 

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.

Share this post


Link to post
Share on other sites
 

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

Share this post


Link to post
Share on other sites
 

You saying you still need something or no?

Yes. If you can get rid of the gaps created by the splitter and array border (marked in red on the second image), that'd be great.

Edited by ShaunR

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
 

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

Share this post


Link to post
Share on other sites
 

Don't think that's possible. All I'm doing is editing data; I'm not writing any code. This is what it looks like.

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.

Share this post


Link to post
Share on other sites

Oh I just thought of something that might help.  Here is a splitter manager utility which helps with panes and splitters.  It can be invoked with QuickDrop and then can do things like set the color, position, and sizing behavior of panes.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
 

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?

Share this post


Link to post
Share on other sites

2018 SP1 F3.

Edit: I think I might be getting it, I didn't set the owner properly.

Share this post


Link to post
Share on other sites
 

Oh I just thought of something that might help.  Here is a splitter manager utility which helps with panes and splitters.  It can be invoked with QuickDrop and then can do things like set the color, position, and sizing behavior of panes.

Quick drop? What's that? :ph34r::lol:

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
 

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

Share this post


Link to post
Share on other sites

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.