LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Control not based on existing controls

Solved!
Go to solution

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?

0 Kudos
Message 1 of 6
(3,305 Views)
Solution
Accepted by topic author NeatNit

Do some research about XControls - they allow you to create custom controls with custom behaviours: http://www.ni.com/tutorial/3198/en/


LabVIEW Champion, CLA, CLED, CTD
(blog)
Message 2 of 6
(3,289 Views)

Thanks. It's weird that all my googling didn't bring up a single mention of this.

0 Kudos
Message 3 of 6
(3,280 Views)

I've made something similar to your edit, take a look and see what you think.

Message 4 of 6
(3,259 Views)

I see, creative use of radio buttons... Very nice!

 

I might use this. Do you mind?

0 Kudos
Message 5 of 6
(3,241 Views)

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

0 Kudos
Message 6 of 6
(3,235 Views)