I try to use the Spinbutton functionality of UltraNumericEditor. Since that functionality is really poorly implemented (come on, guys - how hard can it be to integrate some kind of Increment property that allows in-/decrementing in steps others than just 1....), i'm trying to implement that myself, using the EditorSpinbuttonClick event. Problem is - that event never fires. In fact, there seems to be no possibility of intercepting the spinbutton clicks at all. Juuuuust great... :-(
Any hints to why that wouldn't work? Anyone out there with similar problems? I'm using NetAdvantage 8.1 under VS 2008 on Vista, btw...
Hi,
It's actually not that simple to implement an increment, because right now, the control increments and decrements the appropriate section based on the position of the cursor. And since the control is flexible and has a variable number of sections (based on the mask), exposing the increments is not a trivial matter.
The EditorSpinButtonClick event does not fire, because the built-in spin button you see on the control is not an EditorSpinButton.So what you need to do it turn off the normal spin button (SpinButtonDisplayStyle = Never). Then use the ButtonsRight property to add a SpinEditorButton. Clicking this button will fire the EditorSpinButtonClick event.
Thanks for the fast answer, Mike,
the solution you're proposing works for me. Hope you don't mind me saying that, but this is really a trap that's too easy to get caught in. At least the description of the EditorSpinbuttonClick Event should provide some sort of caveat to this situation. SpinEditorbutton not being SpinEditorbutton is something you wouldn't really expect.
Good to know though that you support people are there to save my ass from time to time...