How do I auto-update a procedure call ONLY at slider tick marks?
Wed, 03/07/2018 - 12:16 pm
I have a graph with an attached panel. The panel has a slider. The slider has ticks, and the action is set to update with each tick. The call to the slider procedure updates a set of waves AND updates DrawActions on the graph. The issue is likely with how I have implemented the latter. I have this ...
DrawAction/W=GraphX getgroup=Teq, delete, begininsert
SetDrawEnv/W=GraphX gstart, gname=Teq
SetDrawEnv/W=GraphX xcoord=MT_iTK, dash=2
DrawLine/W=GraphX 1/(Tequal+TK), 0.1, 1/(Tequal+TK), 0.45
DoWindow/Fpulls the focus away from the panel. In my slider control, I have this ...
if( sa.eventCode & 1 ) // value set
This should return focus back to the panel. But, it seems that it does not. Or at least not the way that I expect.
I want to return to the panel AND the slider that was the focus. I want to be able to slide through the increments of settings and have the procedure update ONLY at the tick settings.
I imagine one approach is to remove the DrawActions in favor of waves to create vertical lines. That would put them in the UpdateCurves() function and protect them by an implicit PauseUpdate.
Am I missing a cleaner approach?
FWIW, the procedure that I am revising is the Semiconductor Plots Demo.
Sliding through any of the sliders causes the graph to update at each tick mark. But then, you have to re-click on the slider to "unstick" it for the next incremental move.