Constant value update

Are you writing your own components and need help with how to set them up or have questions about the components you are deriving from ? Ask them here.
Post Reply
Glaskows
In need of some credit
In need of some credit
Posts: 7
Joined: Fri Sep 02, 2011 6:44 pm

Constant value update

Post by Glaskows »

Hi, the idea is similar to what happens with a spin control, one press the button and the number start changing until one depress it. I am trying to understand how one can create a control that updates its values without creating a timer and polling the states of the input devices.
In particular I've created a graph editor and I want to pan the area when the mouse is near the borders.

Thanks
Auria
Site Admin
Site Admin
Posts: 6695
Joined: Thu Sep 28, 2006 12:23 am
Contact:

Re: Constant value update

Post by Auria »

Hi,

I don't think you can achieve that without a timer. However you don't need to use polling, you can just start the timer when the mouse is pressed and stop it when the mouse is released
"Keyboard not detected. Press F1 to continue"
-- Windows
catalin
Moderator
Moderator
Posts: 1618
Joined: Wed Nov 12, 2008 7:23 am
Location: Romania

Re: Constant value update

Post by catalin »

There's also wxIdleEvent which may come in handy
Post Reply