LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Ring slide not seeing EVENT COMMIT

I am using LabWindows CVI 5.5. I'd like to use ring slide controls with callback functions, but they dont seem to work like I want. My slide has 5 positions. When I use the mouse or the keyboard to change the positions, EVENT_COMMIT is never seen. EVENT_VAL_CHANGED is trapped each time a new position is selected. But I need to know when the user has finalized his selection, like if he moves it from position 1 to positoin 4, I need to only see that final commit event, not the change from 1-2, 2-3, 3-4.

I have a menu type of ring that works fine this way. But if I copy it to the panel the ring slide is on, it no longer works. And if I copy the ring slide to the panel containing the menu ring, the ring slide traps EVENT_COMMIT. That panel
is the main panel of all others in the project.

Any ideas???....
0 Kudos
Message 1 of 4
(3,556 Views)
It sounds like something is swallowing the event: some callback is returning 1 instead of 0. Then the other events (related to one user action) aren't seen.
Does the panel (on which the ring slide doesn't work) have a callback? Could it be swallowing the event EVENT_LEFT_CLICK?
When you click on a control (e.g. your ring slide), the control callback sees the event EVENT_LEFT_CLICK, then the panel sees EVENT_LEFT_CLICK, then the control sees EVENT_VAL_CHANGED, and finally the control sees EVENT_COMMIT. But if the panel callback returns 1 on EVENT_LEFT_CLICK, the event is swallowed and the control never sees EVENT_VAL_CHANGED and EVENT_COMMIT.
0 Kudos
Message 2 of 4
(3,557 Views)
Well I fixed the problem. I had code to set the controls to Normal on the sub-panel, in some modes of my program they will be indicators and on other modes the user can adjust them. When I changed them all to Hot, things started working fine.
Message 3 of 4
(3,556 Views)
YESSS!!! that is the reason my program is not responding to the EVENT_COMMIT!!! THANSK!!!
0 Kudos
Message 4 of 4
(3,349 Views)