11-07-2008 08:17 PM
I've pounded for several hours and searched the forums and have come up cold.
I would like a present a list box with no cells selected. When the user selects only a cell
it highlights for 1 second and then deselects, awaiting for another user selection.
What is the proper programmatic way of doing this. I've been using event structured code.
11-08-2008 12:37 AM - edited 11-08-2008 12:40 AM
Use the Listbox value change event, and start counting time.
After a few seconds use this...
11-08-2008 05:35 PM
I was headed it this general direction. Here is a small VI that "almost" does
what I wanted. Although notice what happens when you mouse down and move around.
I placed the system beep in the loop to listen for extra events.
11-09-2008 01:54 AM
Change the event to mouse up.
But you have to consider what will happen if the user leaves the vi or the control without releasing the mouse button.
11-09-2008 04:21 PM
I did head in that direction and it was an almost.
Here is that VI. It generates events in non cell areas.
It seems what I'm looking for is what
I assumed was a seemingly basic list box function.
Generate an event for a mouse hit in a cell (only)
11-10-2008 04:35 PM
Ben,
It's true that events generated for a List Box object include the entire List Box, not just the cells. Your program is actually the most common workaround. You will need to disregard the event if the value is -1.
Is there a reason the program as you have it written here is not acceptable? If you ellaborate on what your program needs to do, maybe we can offer a better suggestion.
11-10-2008 07:40 PM
This is as close as I can get. I can't find a method to
deselect a cell if you mouse down in a cell and move out of
the box and them mouse it.
11-11-2008 12:29 AM
11-11-2008 03:25 PM
Well I've got to get on with my projects so I'll use my best compromise.
I had no idea that what would be a simple concept would be so difficult in Labview.
The list box must be one of the top ten controls.
With several other programming enviroments I've used, most would return an event
for mouse actions with a modifier for the pane content.
-1 Title Bar
-2 Top Scroll arrow
-3 Botton V scroll array
-4 V Scroll Bar
0..# Active Cell Hit
etc, etc.
Thanks All for your help