LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Text Ring misbehavior with ALT key - Win 7

This may not be a LabVIEW problem, but maybe somebody knows a workaround.

 

 

LV 2010.0

 

I have a text ring, populated with only one item.

I intercept the MOUSE DOWN? event on this control.

Upon that event, I look at the MODIFIER keys (Shift, Ctrl, Alt) and populate the control's menu (STRINGS & VALUES) according to which key(if any) is pressed.

 

(The point is to offer channels in alphabetical order, or in order of units, or in order of hardware type, etc...)

 

 

After populating the menu, the menu pops up and the user sees the list rearranged in whichever fashion.

The user chooses one, and the VALUE CHANGED event triggers removal of the full menu and insertion of the single chosen item.

 

This worked fine..... until I moved to Win 7.

 

Now, when I try the ALT option - the menu just flashes and then disappears.  The first time you ALT-click, it appears for maybe 0.3-0.5 second and then drops.  Subsequent times it just draws the frame and then drops - it's just a blip - maybe 0.1 second.

Clicking on it without ALT works normally, and then the next ALT click will restore the long (0.3-0.5 sec) behavior.

 

If you release the ALT key during that 0.3-0.5 seconds, the menu sticks and works OK, but that's not something people are expecting to do.

 

It's not my code at fault: try this yourself:

Place a TEXT ring or a MENU ring on a new panel.

Enter "A", "B", "C" as your items.

without even running the VI, Alt - click on the thing.

 

In Win 7, it flashes the menu, then takes it away.

 

I've looked for some Easy Access feature that was turned on by mistake - Mouse Keys, Sticky Keys, Toggle Keys, Filter Keys, they're all OFF.

 

Is there a "don't be stupid" preference somewhere that I could turn on? Or do I have to switch to another key?

(I'm using ALt, Ctrl, Shift - maybe I could use the Win Key...)

 

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 1 of 18
(3,343 Views)

The CTRL-ALT combination works just fine.

The SHIFT-ALT combination does the SHORT flash every time - it does not do the 0.3-sec pause.

I don't use the CTRL-ALT-SHIFT combination - but it does the same as CTRL-ALT.

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 2 of 18
(3,339 Views)

I tried modifying the PLATMODS that get passed out of the MOUSE DOWN? event. - No luck.

 

I thought maybe pretending the ALT key was not down would make a difference. 

 

It doesn't.

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 3 of 18
(3,339 Views)

In my program, or a little test program, if I DISCARD the MOUSE DOWN event, then the menu nevar appears.

That's sensible.

Obviously, it's paying attention to my event handler.

Why then, does it not pay attention to the fact that I change the PLATMODS structure so that the ALT key is NOT down?

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 4 of 18
(3,332 Views)

The KEY DOWN? event no longer gets triggered by an ALT key press.

It's called for SHIFT, and for CTRL, but not ALT, with Win 7.

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 5 of 18
(3,325 Views)

can you show us an example vi that demos the behavior your seeing?


"Should be" isn't "Is" -Jay
0 Kudos
Message 6 of 18
(3,316 Views)

Try the little test I suggested:

Place a TEXT ring or a MENU ring on a new panel.

Enter "A", "B", "C" as your items.

without even running the VI, Alt - click on the thing.

 
No code involved - the menu pops up and disappears.
Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 7 of 18
(3,294 Views)

Attached is a VI which shows the SHIFT-ALT-CTRL states when the ring is clicked on.

 

Here is a JING which shows the behavior: http://www.screencast.com/t/2Xh5loKW

 

The JING doesn't capture every flash, as the flash is sometimes quick.  But it shows some of them. It happens every time.

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

Message 8 of 18
(3,293 Views)

That is odd

 


"Should be" isn't "Is" -Jay
0 Kudos
Message 9 of 18
(3,286 Views)

Does "disable the keyboard" work for you or not?

Disable keyboard

0 Kudos
Message 10 of 18
(3,259 Views)