PtNumericInteger mask issue

Hi all,

I have a doubt regarding PtNumericInteger Widget. I understood that PtNumericInteger accepts only integer values. But when I write a sample application for testing, I found that if I type any other characters also, it is visible in the PtNumericInteger widget and if I move on to the next widget in my sample window, the value automatically changes to zero if there are no digits typed.

But I need the PtNumericInteger to discard other characters like alphabets, special characters etc and only the digits which are typed should be visible. I have tried to implement it programmatically by registering a changedcallback. But if any other characters is typed into the PtNumericInteger widget, i found that the changedcallback is not getting called.

So could anyone please help me with any suggestions to solve this issue?

Thanks,
Lullaby

If the Numeric Integer widget doesn’t support your needs, you might want to look at combining a text widget with custom editing and some up-down buttons of your own. That is if you need the up-down buttons.

Ok. Thank you, Maschoen.
So is it confirmed that PtNumericInteger will cause other characters typed to be visible in the widget until the cursor moves to another widget?

I don’t think that’s the case, but you can try it and see.

What I have tried out is already posted in the first post.
I couldn’t find any flags to hide these non-digit characters in PtNumericInteger widget.
Also the registered changedcallback function doesn’t help me if I typed any non-digit characters in PtNumericInteger widget. That is why, I posted my doubt here.
I think no possibilities with PtNumericInteger widget. May be, I am wrong because of my lack of knowledge. Please correct me if I am wrong.

Thanks,
Lullaby.