×

Discussion Board

Results 1 to 8 of 8
  1. #1
    Registered User
    Join Date
    Sep 2003
    Posts
    77

    multi-line entries in selection_list possible?

    Is it possible to create entries in a selection_list that have multiple lines?

    e.g.

    ---------------
    single line entry
    ---------------
    double line
    entry
    ---------------
    single line entry
    ---------------

    I tried to integrate \n, \r , chr(10) and/or chr(13) into a 'choices' entry of a selcetion_list, but had no success. Any hints?

    TIA Martin

  2. #2
    Registered User
    Join Date
    Feb 2006
    Location
    Helsinki, Finland
    Posts
    168

    Re: multi-line entries in selection_list possible?

    Hello dehlerm,

    AFAIK its not possible with appuifw and writing a c++ extension would be complicated

    -Richard
    Nokia E66
    PyS60 1.4.4 final

  3. #3
    Nokia Developer Moderator
    Join Date
    May 2007
    Location
    21.46 N 72.11 E
    Posts
    3,777

    Re: multi-line entries in selection_list possible?

    Even i tried it..I guess its not possible.But yes modifying the extension can do it!
    Pankaj Nathani
    www.croozeus.com

  4. #4
    Registered User
    Join Date
    Sep 2003
    Posts
    77

    Re: multi-line entries in selection_list possible?

    Thanks for your replies!

    I discovered by chance that '\n' works in appuifw.note. It's not a major problem that ist doesn't work in a selection_list. But I wasn't sure if it might be a syntax problem.
    Now I have to decide if I use a Listbox to display more extensive on screen information or a selection_list with it's 'inbuilt' search functionality.

  5. #5
    Registered User
    Join Date
    Dec 2008
    Posts
    6

    Re: multi-line entries in selection_list possible?

    i still don't work to, i want display contact with selection_list with two line such as :

    First Name
    Mobile Number

    how to display two line with selection_list

  6. #6
    Nokia Developer Moderator
    Join Date
    Oct 2007
    Location
    Deva, Romania
    Posts
    3,471

    Re: multi-line entries in selection_list possible?

    Quote Originally Posted by samsee View Post
    i still don't work to, i want display contact with selection_list with two line such as :

    First Name
    Mobile Number

    how to display two line with selection_list
    Like it's been said in the previous replies, it isn't possible.

  7. #7
    Super Contributor
    Join Date
    Mar 2003
    Location
    Espoo, Finland
    Posts
    976

    Re: multi-line entries in selection_list possible?

    This is from PyS60 manual, page 29. You did read manual, didn't you?

    • A normal (single-line item) listbox: a list of Unicode strings, for example [unicode string
      item1, unicode string item2]
    • A double-item listbox: a two-element tuple of Unicode strings , for exam-
      ple [(unicode string item1, unicode string item1description), (unicode string
      item2, unicode string item2description)]
    • A normal (single-line item) listbox with graphics: a two-element tuple consisting of
      a Unicode string and an Icon object, for example [(unicode string item1, icon1),
      (unicode string item2, icon2)].
    • A double-item listbox with graphics: a three-element tuple consisting of
      two Unicode strings and one Icon object, for example [(unicode string
      item1, unicode string item1description, icon1), (unicode string item2,
      unicode string item2description, icon2)]


    Cheers,

    --jouni

  8. #8
    Registered User
    Join Date
    Dec 2008
    Posts
    6

    Re: multi-line entries in selection_list possible?

    ups i missed that manual. i fix the problem with your ideas jouni
    here is my code show contaclist with two line

    Code:
    import e32, appuifw, contacts 
    appuifw.app.title=u"Python Contact"
    
    def contactlist():    
    	c = contacts.open()
    	contactList = []
    	for id in c:
    		name = c[id][0].value 
    		phoneNumber = c[id][1].value  
    		contacName = name
    		MobileNumber = phoneNumber		
    		contactList.append((contacName,MobileNumber)) 
    	  
    	lb = appuifw.Listbox(contactList)	
    	appuifw.app.body = lb
    	
    def exit_key_handler():
        app_lock.signal()
    	
    	
    contactlist()
     
    app_lock = e32.Ao_lock() 
    appuifw.app.exit_key_handler = exit_key_handler
    app_lock.wait()
    may be this code can help new python beginner like me.

    thanks all for your replies and ideas

    Cheers

Similar Threads

  1. GoogleIt
    By deepika.mangla in forum Symbian C++
    Replies: 5
    Last Post: 2011-05-28, 11:04
  2. i cant build helloworld project
    By akhin in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 2
    Last Post: 2008-12-22, 12:38
  3. carbidec++ helloworld project problem
    By akhin in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 0
    Last Post: 2007-03-11, 12:40
  4. carbide build problem help please
    By berkcekisbas in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 1
    Last Post: 2006-09-26, 19:41
  5. My BuilderX (with S60 SDK 2.1.NET MS version) cannot build ARMI UREL
    By danielvidonyi@hotmail.com in forum Symbian Tools & SDKs
    Replies: 1
    Last Post: 2006-05-04, 21:30

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •