LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Touch Screen Programming

I have an application I'd like to program using a touch-screen.  It will be a "reaching test" -- a button on the screen will light up, and the user has to push it.  I'd like to do this in "pure LabVIEW", and can almost figure out how to do it.  One idea is to have the "buttons" be Front Panel boolean controls (round or square "lights") -- I can vary the color, the size, the position, etc. by adjusting the control properties.  I can even make the control disappear and appear.  It is, of course, trivial to tell when/if the control has been pushed (just check its state!).  The only "gotcha" is that the default (and maybe ONLY) Front Panel is an uninteresting shade of gray!  Can I get a white front panel?  If so, I can arrange for it to be displayed on the Touch Panel with the "controls", and then the program becomes quite intuitive and simple.  [Even nicer, of course, would be to put arbitrary images at arbitrary positions on an arbitrary background, but it's not so bad to put round or rectangular lighted buttons of various colors and sizes on a plain, preferably white, background ...].

Bob Schor
0 Kudos
Message 1 of 3
(2,883 Views)

You can change the color of the front panel by displaying the tools palette (in 8.x it's in the View menu) and selecting the coloring tool. You can also change it programmatically by opening a reference to the panel or pane using property nodes (VI.Panel>>Panes[]).

Another way to detect clicks is by using the event structure. See example attached (7.0).

If you want to display images, you can use the picture control, which can allow you to do anything you want basically. You can find some relevant info here.

You should note that both the picture control VIs and the event structure cannot be played with in LabVIEW base, so I hope that's not the version you have.


___________________
Try to take over the world!
0 Kudos
Message 2 of 3
(2,861 Views)
Thanks.  I'd just found the info on the Color property of the Panel object, and was going to post the answer to my question myself, but you beat me to it!  I wrote a very simple "proof of concept" routine that has alternating round and square buttons popping up at random points on the screen, and timing how quickly you can click them with the mouse.  Now all I have to do is make the background white ...

Bob Schor
0 Kudos
Message 3 of 3
(2,834 Views)