LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

mouse wheel problem with scroll bar and value change event

I tried the VI with f2 patch. It is still crashing. The behaviour is pretty random, in the sense that sometimes you need more scrolls, sometimes even gentle are enough, sometimes furious.

 

I'm using Windows XP SP3, just in case.

0 Kudos
Message 11 of 21
(1,501 Views)

Just tried the VI on Windows 7, LabVIEW 2009 (unpatched) and it crashes. Nitin, can you update the CAR with this information?

 

Best Regards

 

David

 

 

0 Kudos
Message 12 of 21
(1,489 Views)

To add more information.

 

I was originally on my work PC when answering this thread  WinXP with LV2009f2.  When I first created the two scroll bar VI, it didn't crash, but showed the very odd scroll bar behavior.  In the middle of composing my message, I went back and worked with it again and that is when I got my crashes.  Generally right away.

 

I just tried my VI on my home PC (Vista Home Premium with LV2009f2), so far no crashes.

 

Now being able to run it on my home PC got to answering the question I was trying to investigate which was if it was some sort of control focus issue.

1.  When I first run the VI, neither event executes just by scrolling over the scroll bar.
2.  Click on a scroll bar and move it, then the event executes when using the scroll wheel.  The other scroll bar does not.

3.  Click on the other scroll bar and move it, then the event executes using the scroll wheel for that one while the first scroll bar stops executing with the scroll wheel hovering over it.

4.  If I just click on the scroll bar, but don't actually change the value with that click, then it will continue to not execute with the scroll wheel.

 

So with the double scroll bar, it seems to indicate that there is some sort of focus issue going on.  The actual value change event only works with if your give that control focus by clicking on it and moving the scroll bar (or using the up/down arrows at the end).  After that, the scroll wheel fires the value change event.  If you don't give it focus in that way, using the scroll wheel causes the value of the control to change as seen by the polling loop, but the value change even doesn't fire with the scroll wheel.

 

I would consider this a bug in itself since the behavior seems inconsistent.  But the bug related to LabVIEW crashing on some systems (but not all) would supercede this.  Whether the two bugs are inherently related or caused by two different things, I don't know.  The first but is LabVIEW crashing.  If it doesn't cause a crash on your system, then it is possible to see the originally reported problem with the scroll wheel not firing value change events even though the value is changing until you can give the control a certain level of focus by actually clicking on it and changing the value that way first.

0 Kudos
Message 13 of 21
(1,475 Views)

Yes, that's the same thing I'm seeing on my machine. I also see this as unexpected behavior and it should be looked at. I (or NitinD) will update the CAR so R&D can take this information into account. Thanks Ravens Fan.

 

Best Regards

 

David 

0 Kudos
Message 14 of 21
(1,458 Views)

Done.

 

Thanks Ravens Fan and hbcnb.

Message 15 of 21
(1,454 Views)

Beat me to it Smiley Happy

Good work Nitin

0 Kudos
Message 16 of 21
(1,449 Views)

Hello I am facing the same problem. If i first run the VI, click once or twice on boolean (just to change my focus to it), move the mouse over the scrollbar and use the mouse wheel, the scrollbar's value doesn't change. Nevertheless, if I click once on the scrollbar (up and down arrows or white area to jump a page), and then I use the mouse wheel, everything work fine. But, if I click on the boolean to change my focus to it again, and move the mouse over the scrollbar and use the mouse wheel (with no previous click of the mouse on the scrollbar), the scrollbar's value does not change.

 

What's the solution for that?

 

I tried to use a "mouse enter" event to set Srollbar.KeyFocus to true, but it didn't work.

 

Thanks

 

Dan07

 

 

0 Kudos
Message 17 of 21
(1,095 Views)

Using LabVIEW 2010, your VI seems to work okay for me.

 

I'd recommend taking the 100 msec wait out of the loop.  The event structure will control the pacing of the loop.

0 Kudos
Message 18 of 21
(1,086 Views)

I forgot that 100 msec wait inside the while loop, it was already removed.

 

I am running this VI on 8.6. If you open Labview, run the VI for the first time, move the mouse over the scrollbar (don't click the scrollbar) and scroll the mouse wheel (just scroll, don't click), the numeric indicator will not show the value change. But, as soon as you do the first click on the scrollbar, all the scroll made with the mouse wheel will modify the value at the numeric indicator.

 

Try this sequence and tell me what you see.

 

Thanks a lot for your help.

 

Dan07

0 Kudos
Message 19 of 21
(1,074 Views)

Yes.  I see the behavior you are describing in LV 8.6 and LV 2009.  But it seems to work like I expected in LV 2010.

 

It must have been a bug with handling the events for the mouse scrollwheel that was fixed in LV 2010.  I tried searching to see if I could find any reference to it.  There are a few mentions of scrollwheel bugs, but none that seemed exactly like what is happening in 8.6 and 2009.

0 Kudos
Message 20 of 21
(1,057 Views)