OpenDCL Forums

OpenDCL => Runtime/AutoLISP => Topic started by: roy_043 on October 04, 2011, 03:13:29 AM

Title: SpinButton questions: Flip buttons? Partial disable?
Post by: roy_043 on October 04, 2011, 03:13:29 AM
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?
Title: Re: SpinButton questions: Flip buttons? Partial disable?
Post by: Fred Tomke on October 05, 2011, 04:18:47 AM
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 (http://www.opendcl.com/forum/index.php?topic=995.0) for a sample).
Regards, Fred
Title: Re: SpinButton questions: Flip buttons? Partial disable?
Post by: roy_043 on October 06, 2011, 08:56:54 AM
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.
Title: Re: SpinButton questions: Flip buttons? Partial disable?
Post by: Fred Tomke on October 07, 2011, 12:19:10 AM
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