allowed only number in a field

Login to reply to this topic.
Wed, 2008-01-30 12:42
Joined: 2006-07-21
Forum posts: 151

Hi,
i need to allow in a fild of form to insert only number.
I use this for example:

DLG_LINE
		{
			type = EAknCtIntegerEdwin;
			prompt = "gps task (in second)";
			id = idGpsConfiguration;
			itemflags = EEikDlgItemTakesEnterKey | 	EEikDlgItemOfferAllHotKeys;
			control = AVKON_INTEGER_EDWIN
			{
				maxlength = 2;
				min = 1;
				max = 60;
				//numeric_keymap = EAknEditorStandardNumberModeKeymap;
				//allowed_input_modes = EAknEditorNumericInputMode;
				//default_input_mode = EAknEditorNumericInputMode;
			};
		},

but this allowed to insert element such as +, E, *, etc
How to locked all chart and allowed only number?

Many thanks
Silvia


Wed, 2008-01-30 12:57
Joined: 2007-12-19
Forum posts: 49
Re: allowed only number in a field

I don't think it is possible. Other solution is to filter key events in OfferKeyEventL method and pass only numbers.

Wed, 2008-01-30 19:50
Joined: 2003-12-05
Forum posts: 603
Re: allowed only number in a field

Or use HandleControlEventL, or even the event for observing Edwin events.

  • Login to reply to this topic.