SpinButton questions: Flip buttons? Partial disable?

Started by roy_043, October 04, 2011, 03:13:29 AM

Previous topic - Next topic

roy_043

Flip buttons?
I would like to flip the buttons of a vertical SpinButton. The Up button should count down instead of up. Not a big problem, I'll just use (- delta) in my code, but it would be an interesting feature.

Partial disable?
Is it possible to disable only one of the two button?

Fred Tomke

Hello, not it is not possible. You have to draw two image buttons instead or you create a generic spin button using picturebox (see here for a sample).
Regards, Fred
Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]

roy_043

Many thanks for that sample. Your RangeSelector looks great.
But the SpinButton has a special OnChanged event which will fire multiple times if you keep pushing down on one of its buttons. I don't see an event for a normal button or a PictureBox with this behaviour. So emulating a SpinButton seems difficult.

Fred Tomke

Hm, you are right. Unfortunately, OpenDCL doesn't provide a Timer control. In that case you could start the timer at OnMouseDown and stop it at OnMouseUp or OnMouseOff. In the time between the timer is elapsing and changes the control's value.

Regards, Fred
Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]