How to format text as I'm typing?
-
I want to be able to format text as it's being edited, either programmatically or by writing; but how can I do that? My formatting has two criteria: 1) it has to be a number (either integer or float) and 2) it has to end with ,- (money delimiter in Norway). It has to be done programmatically and by writing, because the end user should be able to input numbers using a custom number inputting component (for touch devices) and keyboards.
Obviously I can't do this:
onTextChanged : { text: parseInt( price ) + ",-" }
As that would result in a loop.
Is there anything else I could try to do? -
I want to be able to format text as it's being edited, either programmatically or by writing; but how can I do that? My formatting has two criteria: 1) it has to be a number (either integer or float) and 2) it has to end with ,- (money delimiter in Norway). It has to be done programmatically and by writing, because the end user should be able to input numbers using a custom number inputting component (for touch devices) and keyboards.
Obviously I can't do this:
onTextChanged : { text: parseInt( price ) + ",-" }
As that would result in a loop.
Is there anything else I could try to do?