kanber Posted May 18, 2023 Share Posted May 18, 2023 Hi, I what catch when mouse right click and hold on pressed increase a value. OnLButtonDown and OnLButtonUp only work when pressed only one time. I can find long way to do it but I what to ask is there any easy way? Quote Link to comment Share on other sites More sharing options...
AzeoTech Posted May 18, 2023 Share Posted May 18, 2023 So you want to do, basically, a jog? So a value is, say, incremented 10 times a second while the button is held down? You probably don't want OnLButtonDown/Up unless you are talking about the event associated with the component. The trick is that the events need to start and stop a sequence. So, OnLButtonDown would just have something like: beginseq(incrementMyVar) and OnLButtonUp would have endseq(incrementMyVar) Then the sequence "incrementMyVar" would be something like: while(1) myVar++ delay(0.1) endwhile Quote Link to comment Share on other sites More sharing options...
kanber Posted May 19, 2023 Author Share Posted May 19, 2023 Yes I done like that. But when I leave button it takes almost one second to show button on page like unpressed. It is like hanging. It stay like pressed position one second. I tried to change page refresh time to 0.1 but nothing changed. I closed begin and endseq lines and test it work find. Quote Link to comment Share on other sites More sharing options...
AzeoTech Posted May 19, 2023 Share Posted May 19, 2023 I can't say without seeing the ctl document. There is probably something else going on. Can you post or email us the doc? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.