| Reply | « Previous Thread | Next Thread » |
|
Hi
I want to make main screen for my application in which multiple icons are available.user have to select one icon to enter into purticular section. Can any body help me how to make main screen in python? thanx |
| Faisal Rehman |
| View Public Profile |
| Find all posts by Faisal Rehman |
|
Join Date: Oct 2007
Posts: 2,841
Location: Deva, Romania
Offline
Forum Nokia Champion
|
|
Hi,
I'm not sure I understand what you mean, but I suppose you could draw some images that represent the icons on a canvas and have that as the app's screen. Is that what you meant? |
|
Join Date: Feb 2008
Posts: 2,542
Location: Bhavnagar, Gujarat, India
gaba88
Offline
Forum Nokia Champion
|
|
|
Quote:
yes bogdan is absolutely correct it will be better if you explain your question bit in detail. Thanks Gaba88 Gargi Das- http://gargidas.blogsot.com Forum Nokia Python Wiki Learn Python at http://mobapps.org/PyS60 |
|
Quote:
Untested pseudocode, some mandatory parts may not exist: Code:
class Main:
def __init__(self):
self.lock = e32.Ao_lock()
self.menu_entries = []
self.menu_entries.append(((u"Screen 1"), Scr1(self)))
self.menu_entries.append(((u"Other"), Other(self)))
# Create main menu from that sequence
self.main_menu = [item[0] for item in self.menu_entries]
# Create list of views from sequence above
self.views = [item[1] for item in self.menu_entries]
# Create a listbox from main_menu and set select-handler
self.listbox = appuifw.Listbox(self.main_menu, self.handle_select)
self.activate()
def handle_select(self):
self.views[self.listbox.current()].activate()
def run(self):
self.lock.wait()
self.close()
def activate(self):
"""Set main menu to app.body."""
appuifw.app.exit_key_handler = self.exit_key_handler
appuifw.app.body = self.listbox
def exit_key_handler(self):
if appuifw.query(u"Quit program", 'query') is True:
self.running = False
self.lock.signal()
class Scr1:
def __init__(self, parent):
self.parent = parent
# initialize app.body here
def activate(self):
# draw screen stuff here
def close(self):
self.parent.activate() # restores main screen
App = Main()
App.run()
|
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Rate This Thread | |
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| Emulator main screen overwrites application screen | nguyenhoaiduc | Symbian User Interface | 4 | 2009-02-05 16:40 |
| user interface ideas - options menu vs. main screen menus | hp3 | WRT Widget Development | 0 | 2008-06-12 19:38 |
| Return from the second screen to main screen | akus | Python | 2 | 2007-09-14 10:41 |
| How to display an icon on the main screen | sergiutruta | Mobile Java General | 2 | 2005-02-15 13:53 |
| program to move files from phone main screen | j2me_raj | General Symbian C++ | 6 | 2004-11-19 11:51 |