Hi,I have a numeric editor in my toolbar with the spin buttons on.
I want to execute on update when they either hit the buttons up and down, OR typing in a new value. The issue is that I DON'T want to fire the event after every [single] key down, just after they are done editing. (perhaps they want to change the value from 5, to 50...I don't want the event to fire until they leave the control).
Now, there is a afterexitedit event..except that fires after the toolvaluechanged event. I suppose I could manually track what is going on with a boolean but maybe there is a single event I could use to do this?
Thanks
Thanks so much. I think I should be able to make it work with what you have provided.
Hello,
Internally to the MaskEditTool, we use EditorWithMask. Unfortunately, we don’t expose the ButtonsLeft/ButtonsRight collections, nor the editor itself.
There are two possible solutions:
1. You can use the ControlContainerTool to hold a UltraMaskedEdit and use the above functionality I provided when NumericEditor is used inside ControlContainerTool.2. The other possibility is to derive a new tool from the MaskedEditTool which exposes the Editor so the EditorSpinButtonClick event can be subscribed to. As the designer don’t know about this new derived typed, you will most likely have to add the tool programmatically.
I have attached the class which both exposes the Editor via a new property as well as adding the EditorSpinButton.
You may use the following lines of code to subscribe the EditorSpinButtonClicked event.
this.ultraToolbarsManager1.Tools.Add(new SpinButtonMaskedEditTool("SpinMaskEditTool1"));
SpinButtonMaskedEditTool spinTool = this.ultraToolbarsManager1.Toolbars[0].Tools.AddTool("SpinMaskEditTool1") as SpinButtonMaskedEditTool;
spinTool.MaskEditor.EditorSpinButtonClick += new Infragistics.Win.UltraWinEditors.SpinButtonClickEventHandler(MaskEditor_EditorSpinButtonClick);
Hi
I am using a MaskedEditTool in the toolbar. Where in that object can I access the ButtonsRight collection?
Thanks.
Were you able to resolve your issue?
There is no event for built - in spin button. What you can do is hide the built in spin button by setting SpinButtonDisplayStyle to "Never" and then you can add a SpinEditorButton to the ButtonsRight collection. In this case the EditorSpinButtonClick event of the UltraNumericEditor would fire.
In this event you would also have to adjust the value of the Control in code as it would not do it for you automatically like it does for built in buttons.
Depending upon the ButtonType you can increment or decrement the value.
Let me know if you have any questions on this matter.