compare 2 values
len(textobject) < 9 add number
The only flaw of that logic is that the user can use Ctrl+V to enter infinite amount of numbers.
Better to use (Usefull not only for numbers):
*TextBox: On Changed
->TextBox: Set text to left(self.Text,9)
If you want only positive numbers you can use:
*TextBox: On Changed
->TextBox: Set text to str(clamp(float(Self.Text), 0, 999999999))
If you want positive whole numbers:
*TextBox: On Changed
->TextBox: Set text to str(clamp(int(Self.Text), 0, 999999999))