04-04-2013 10:00 PM
Solved! Go to Solution.
04-05-2013 12:38 AM
I agree that any type of ring control is a good choice, a suitable event is EVENT_VAL_CHANGED.
But I also would remind you that CVI comes with a large collection of sample programs, some of them also include ring controls. Analyzing those samples also helps to get acquainted with CVI.
04-05-2013 11:52 AM
Hi, Wolfgang --
You're right, the menu ring is a much preferred approach to the list box I was trying.
I have it mostly working. The only problem I can see is, after a user makes a selection, the display doesn't update until he's moved the mouse. Oddly, this only happens in the real program (not when operating in the UIR editor).
Any ideas why this might be?
Thanks.
04-05-2013 07:37 PM
Another question...is it possible to programmatically disable ("ghost") certain items in the menu?
04-06-2013 12:26 AM
SetRingItemAttribute (, , , ATTR_DIMMED, );
04-06-2013 09:27 AM
Ah, OK. So I dim it with that, but handle the disabled selections myself? That would work.
I'm still trying to figure out why the EVENT_VAL_CHANGED case doesn't trigger until the user moves the mouse a few pixels after making his selection. If you have any ideas there, that'd be great.
04-06-2013 10:43 AM
@mzimmers wrote:
I'm still trying to figure out why the EVENT_VAL_CHANGED case doesn't trigger until the user moves the mouse a few pixels after making his selection. If you have any ideas there, that'd be great.
It does work usually, so I would assume that it has to do with your code...
You will need to debug it yourself as we don't know it.
Some suggestions: in the callback try to react to one type of event only; clone your project and remove all other callbacks except the ring control and its callback, particularly things like panel callbacks, extended mouse events or your TCP callback...
04-06-2013 04:38 PM
Hey, Wolfgang -
Before I try your suggestion, do I understand that other callbacks could somehow be impeding the callback for the ring? I do have a timer CB that triggers several times a second. I'm trying to understand how this would cause me a problem, though. I suppose I could check for getting focus on the ring, and disabling the timer until I lose focus, or something like that.
04-06-2013 11:45 PM
May be the first thing to try is to select the ring and then use your keyboard (up/down keys) to change the selection. This way you can be sure that the mouse has not been moved...
04-07-2013 12:21 AM
On your advice, I disabled the one CB that might have been interfering, and the ring works fine. The CB that I disabled does a lot of work, but I don't know enough about the overall CB mechanism to know how it might be blocking the ring.
I think in the morning, I'm going to replace all of my TCP calls with native WS2 operations. I'll see if that improves things, and report back.