Reply
Thread Tools
Posts: 42 | Thanked: 75 times | Joined on Jan 2010
#1
Hi,
I'm writing a small app for the N900 using Python / PyGTK.

Do you know what is the best / recommended way to have the user input numbers in an Entry without having to keep the Fn key pressed?

It is possible, I've seen it done by the calendar application, the contact application etc, however it seems like non-core apps never use this functionality.
I cannot use a Selector, because the range of possible values is simply too big and it would be quite annoying to have to scroll through it.

I thought about simply "intercepting" the pressed key and replacing it with the number, but it seems that doing this in GTK might be a bit convoluted. I hoped there was some sort of simple switch, like hildon_set_fn_key_lock

Thanks in advance,
Giacomo
 
qwerty12's Avatar
Posts: 4,274 | Thanked: 5,358 times | Joined on Sep 2007 @ Looking at y'all and sighing
#2
You want hildon-gtk-entry-set-input-mode(). Setting it to HILDON_GTK_INPUT_MODE_NUMERIC will only allow for numeric input. Feel free to combine the modes as needed :-)

Ah, Python... Don't know the Python equivalent, sorry...

Last edited by qwerty12; 2010-01-21 at 10:21.
 
Posts: 42 | Thanked: 75 times | Joined on Jan 2010
#3
Thanks a lot! That gives me a good pointer, I'm sure there is a way of using it in Python.

Great, thanks again
 
qwerty12's Avatar
Posts: 4,274 | Thanked: 5,358 times | Joined on Sep 2007 @ Looking at y'all and sighing
#4
Originally Posted by toyg View Post
Thanks a lot! That gives me a good pointer, I'm sure there is a way of using it in Python.
This bug report is probably what you're after: https://bugs.maemo.org/show_bug.cgi?id=5184
 
Reply


 
Forum Jump


All times are GMT. The time now is 17:05.