| Reply | « Previous Thread | Next Thread » |
|
I am developing a mobile application using PyS60, and would like to develop an attractive UI. I would like to use the following functionality:
- allow the user to type onto the canvas I have not found any examples of this. Does anyone know if this is possible? Has anyone come across any good UI examples on PyS60? Thanks in advance for your expertise. |
|
Join Date: Oct 2007
Posts: 2,841
Location: Deva, Romania
Offline
Forum Nokia Champion
|
|
You could detect keypresses and write the text on the canvas accordingly. But it might be tricky to switch between text and number mode.
Or you could use a personalised version of appuifw.Text() with custom font color/size/style. And appuifw2 offers enhanced functionality.
Last edited by bogdan.galiceanu : 2008-10-26 at 16:09.
|
|
Join Date: Feb 2008
Posts: 743
Location: Belo Horizonte, Brazil
Rafael T.
Offline
Forum Nokia Champion
|
|
This is quite easy:
Code:
import appuifw # creates an instance for the text tx = appuifw.Text() #sets app body to text appuifw.app.body = tx # sets the text font tx.font = u"Nokia Hindi S6016b" # sets text color - red in this case tx.color = (255,0,0) # sets text style - bold in this case tx.style = (appuifw.STYLE_BOLD) # adds text Hello World! to the screen tx.add(u"Hello World!") # returns unicode string with the screen text user_text = tx.get() # clears the text editor tx.clear() Hope it helps, Rafael.
Last edited by Rafael T. : 2008-10-26 at 16:43.
|
|
Thanks Bogdan -
It seems like the method you describe would not allow a person to input letters effectively, since each key corresponds to three letters. Am I correct? I would like to implement my own version of forms and add IM functionality. However, it is important that these features are in keeping with my application design that I will design on the canvas. Alternatively, perhaps it is possible to import images onto a text interface (appuifw.text)? |
|
Join Date: Feb 2008
Posts: 2,542
Location: Bhavnagar, Gujarat, India
gaba88
Offline
Forum Nokia Champion
|
|
|
Quote:
AFAIK you cant draw an image on appuifw.text(). You can draw an image using canvas class and then add text on that image. hope i got your question. ![]() ![]() Enjoy Pythoning Gaba88 Gargi Das- http://gargidas.blogsot.com Forum Nokia Python Wiki Learn Python at http://mobapps.org/PyS60 |
|
Join Date: Oct 2007
Posts: 2,841
Location: Deva, Romania
Offline
Forum Nokia Champion
|
|
|
Quote:
![]() And sadly it isn't possible to put images on appuifw.Text |
|
Join Date: Feb 2008
Posts: 743
Location: Belo Horizonte, Brazil
Rafael T.
Offline
Forum Nokia Champion
|
|
It isn´t possible to display an image using appuifw.Text()
You can use appuifw.Canvas() or if the image will be displayed just for some seconds you may put it on a Topwindow() For the keypress problem, unfortunately, the only solution is the one provided by Bogdan, which really needs lot of work. ![]() BR, Rafael.
Last edited by Rafael T. : 2008-10-27 at 18:21.
|
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Rate This Thread | |
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| Nokia 6300 limiting user input | aib | Mobile Java General | 5 | 2008-10-08 15:04 |
| How to have user input string of only digits | yqmtooblue | Python | 3 | 2007-12-06 15:33 |
| A large number of text leads to App. closed: lcdui USER 130 | iloveyiyi | Mobile Java General | 3 | 2007-10-09 10:33 |
| How to get numeric input from user in Text mode(NOT GUI)??? | Amit Mahajan | Symbian User Interface | 4 | 2006-04-13 06:35 |
| Notifications of changing text input mode | GuusDavidson | Symbian User Interface | 0 | 2005-11-07 06:05 |