Hi,
I'm not sure if any of you guys face this problem,
in my UltraCurrencyEditor, there's a predefined value of $______0.00 whenever the control loads. When Iclick on the text box to enter an amount, say I want to enter $15.00. So naturally, I would key in the digits ONE -> FIVE -> DECIMAL POINT -> ZERO -> ZERO, but the first 0 remains there always, so I'll get $150.00 instead.
I have to highlight the whole text field, and key in "1", "5", ".", "0", "0" to get it correct
How can I fix this?
Maybe I misunderstood your objective. The code I posted will cause all the text to be selected when the control is entered, so that the first keystroke by the user will clear the previous contents. If the text is getting highlighted when you tab into it, the code is functionaing as expected. If there is more to this please repost with clarification.
Hi, Pressing the tab button to enter the control works, the text gets highlighted, but control.SelectAll(); does nothing, the cursor just appears inside.
Typically one handles the Enter event, and calls the SelectAll method therein:
ultraCurrencyEditor.Enter += new EventHandler(ultraCurrencyEditor_Enter); ultraCurrencyEditor.TabNavigation = MaskedEditTabNavigation.NextControl;
void ultraCurrencyEditor_Enter(object sender, EventArgs e){ UltraCurrencyEditor control = sender as UltraCurrencyEditor; control.SelectAll();}