Skip navigation.
Home
The QNX Community Portal

View topic - PtNumericInteger mask issue

PtNumericInteger mask issue

Isn't the name clear?

PtNumericInteger mask issue

Postby lullaby » Wed Feb 06, 2013 6:41 am

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
lullaby
Active Member
 
Posts: 82
Joined: Fri Jun 15, 2012 6:19 am

Re: PtNumericInteger mask issue

Postby maschoen » Wed Feb 06, 2013 7:18 am

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.
maschoen
QNX Master
 
Posts: 2644
Joined: Wed Jun 25, 2003 5:18 pm

Re: PtNumericInteger mask issue

Postby lullaby » Wed Feb 06, 2013 12:16 pm

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?
lullaby
Active Member
 
Posts: 82
Joined: Fri Jun 15, 2012 6:19 am

Re: PtNumericInteger mask issue

Postby maschoen » Wed Feb 06, 2013 6:41 pm

lullaby wrote: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.
maschoen
QNX Master
 
Posts: 2644
Joined: Wed Jun 25, 2003 5:18 pm

Re: PtNumericInteger mask issue

Postby lullaby » Thu Feb 07, 2013 4:46 am

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.
lullaby
Active Member
 
Posts: 82
Joined: Fri Jun 15, 2012 6:19 am


Return to GUI Programming

Who is online

Users browsing this forum: No registered users and 1 guest