04-05-2016 05:37 AM - edited 04-05-2016 05:49 AM
For my UI I need an 8-directional Front Panel control, kind of like a D-Pad or a digital arcade stick, as seen on the left side here:
Or this:
Its output would ideally be an Enum, identifying the direction in which it's moved:
0: Center
1: Left
2: Right
3: Up
4: Down
5: Left Up
6: Left Down
7: Right Up
8: Right Down
The order doesn't actually matter. In fact, neither does the data type as long as it works. It would also need to be able to respond to keyboard keys e.g. arrow keys.
The problem I'm having is that I can't make this control. To the best of my knowledge, a control like this does not exist natively in LabVIEW. So I looked into creating custom controls, but all the resources I've found only show you how to take an existing control (e.g. a slider) and change its appearence. Absolutely nothing about creating controls that behave differently than the default, NI-made controls.
I've spent enough time looking for resources that I have to ask: is this even possible?
Edit: I would grudgingly suffice with having a cluster with 4 boolean controls, each corresponding to one of Left, Right, Up, Down. But then, can I make their graphics dependant on each other? If not, can I at least prevent pressing Left and Right simultaneously?
Solved! Go to Solution.
04-05-2016 05:50 AM - last edited on 01-08-2025 08:21 AM by Content Cleaner
Do some research about XControls - they allow you to create custom controls with custom behaviours: https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000x2jVCAQ&l=en-US
04-05-2016 05:57 AM
Thanks. It's weird that all my googling didn't bring up a single mention of this.
04-05-2016 06:35 AM
I've made something similar to your edit, take a look and see what you think.
04-05-2016 07:58 AM
I see, creative use of radio buttons... Very nice!
I might use this. Do you mind?
04-05-2016 08:00 AM
Feel free to use it, just be aware that I grabbed the images from some icon site that I'm fairly certain had a no comercial use policy