×

Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 25
  1. #1
    Regular Contributor
    Join Date
    Mar 2010
    Location
    Bangalore
    Posts
    50

    Arrow How to get a multiple line display ?

    Hi,

    I would like to know : How to get a multiple line display .

    I am successfully able to do it on the emulator. But, when i transfer it to the phone and test it , it does not display the same way - it displays sideways instead.

    Its something like this ( on the emulator )

    Ashwin
    Bangalore
    India

    On the phone:

    Ashwin Bangalore India


    For programming , I had used this technique:


    String[ ] values =
    {
    "\n Ashwin " + "\n Bangalore" + "\n India "
    }



    Kindly help.

    Thanks
    -Ashwin

  2. #2
    Nokia Developer Expert
    Join Date
    Aug 2007
    Posts
    1,595

    Re: How to get a multiple line display ?

    Hello itzashwin,

    which phone and emulator do you use?

    Regards,
    r2j7
    [URL="http://library.forum.nokia.com/java"][B] >>> Java Developer's Library <<<[/B][/URL]
    [URL="https://www.developer.nokia.com/Resources/Support/Technical_support.xhtml"] [B]>>> Technical Support for Java ME development <<<[/B][/URL]
    [URL="https://publish.ovi.com/info/"][B]>>> Nokia Publish: reach millions of Nokia users worldwide through Nokia Store <<<[/B][/URL]

  3. #3
    Regular Contributor
    Join Date
    Mar 2010
    Location
    Bangalore
    Posts
    50

    Re: How to get a multiple line display ?

    Hi,

    I use the WTK 2.5 (Sun Java's ). I tested my app on two phones

    1. SE k550i : The display was something like, as that in a Ticker class and the display took a lot of time to appear.



    2. Nokia 6600 : The display was like the one i had posted in my 1st post.

    1 thing : I just used the JAR file , i was unable to use the JAD - would that affect ?

    Thanks
    -Ashwin

  4. #4
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    Re: How to get a multiple line display ?

    On what are you trying to display the text? On a Form? A Canvas? Something else?

    Graham.

  5. #5
    Regular Contributor
    Join Date
    Mar 2010
    Location
    Bangalore
    Posts
    50

    Re: How to get a multiple line display ?

    Hi Graham,

    I initially use the Form with a TextField appended to it.

    I then use the List to display the text so that i can select the respective entry and obtain more details. This is where I am facing issues.

    Its like this:

    I search for Ashwin in the first place using the Form and TextField.
    The search results are displayed in the List so that i can select the entry and fetch more details.

    Thanks
    -Ashwin

  6. #6
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    Re: How to get a multiple line display ?

    I'm still not clear where you're trying to display multiple lines.

    If you want to display multiple lines in a List, add each line separately.

    Code:
    list.append("first", null);
    list.append("second", null);
    list.append("third", null);
    Graham.

  7. #7
    Regular Contributor
    Join Date
    Mar 2010
    Location
    Bangalore
    Posts
    50

    Re: How to get a multiple line display ?

    Hmm , its not that way.

    Let me be more specific.

    I initially search inside the database. I must get results of this category.

    -------------------

    1. Ashwin
    Bangalore
    India

    2. Graham
    London
    UK

    3. Raj
    Delhi
    India

    ---------------------------

    These results will be displayed in the List.

    The issue with me is , it is displayed the same way as I've shown here on an emulator. But, when i put it on the phone , it'll be something like this

    --------------

    1. Ashwin Bangalore India

    2. Graham London UK

    3. Raj Delhi India

    ----------------

    much like a Ticker display. I am unable to view it like before , so - i wanted to have multiple line display for each entry.

    Please check my first post for declaration type of the entries.

  8. #8
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    Re: How to get a multiple line display ?

    Ah, I see. I'm afraid there is no rule that says List items can be multi-line. You'd need to create a CustomItem subclass and use a Form. There is no standard way of doing what you want.

    Graham.

  9. #9
    Regular Contributor
    Join Date
    Mar 2010
    Location
    Bangalore
    Posts
    50

    Re: How to get a multiple line display ?

    Could you please cite an example ? I am not that clear.

    The reason why i chose list for displaying the search result is - its easy to select the items and progress further using the "getSelectedIndex()" command

  10. #10
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    Re: How to get a multiple line display ?

    Oh, List is ideal for displaying lists. But it doesn't display multi-line items. It's not very flexible.

    I'm afraid I don't have an example. CustomItem allows you to build your own Items to add to a Form. It should be possible to use this to build your own "list" using a Form. Alternatively, you could use a Canvas, but that will require more work.

    Graham.

  11. #11
    Regular Contributor
    Join Date
    Mar 2010
    Location
    Bangalore
    Posts
    50

    Re: How to get a multiple line display ?

    Fine , let me try it out !!

    Thanks for your help

    - Ashwin

  12. #12
    Regular Contributor
    Join Date
    Mar 2010
    Location
    Bangalore
    Posts
    50

    Re: How to get a multiple line display ?

    A small doubt !!

    Can we have the Screen and Canvas class related programs on the same code ?

    - Ashwin

  13. #13
    Super Contributor
    Join Date
    Mar 2008
    Location
    The Capital of INDIA
    Posts
    4,328

    Re: How to get a multiple line display ?

    Quote Originally Posted by itzashwin View Post
    A small doubt !!

    Can we have the Screen and Canvas class related programs on the same code ?

    - Ashwin
    I think that you can only use the Alert from the screen class on the same Canvas class, and not other then that, like the List, TextBox, Form.
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

  14. #14
    Regular Contributor
    Join Date
    Mar 2010
    Location
    Bangalore
    Posts
    50

    Re: How to get a multiple line display ?

    Oops, nothing going my way !

    Thanks Raj.

    By the way , by reducing the font size , can be this displayed correctly ?

    - Ashwin

  15. #15
    Super Contributor
    Join Date
    Mar 2008
    Location
    The Capital of INDIA
    Posts
    4,328

    Re: How to get a multiple line display ?

    Quote Originally Posted by itzashwin View Post
    By the way , by reducing the font size , can be this displayed correctly ?

    - Ashwin
    I suspect if this can be done...
    Why don't you alternatively, use a Canvas?
    Just customize this..and write the same as per the requirement.The thing is that you have to do all the stuff.
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

Similar Threads

  1. HELP! Handling Call!!
    By joseph.m in forum Symbian
    Replies: 14
    Last Post: 2009-03-09, 09:00
  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. Error while making sis file
    By lalitjadiya in forum Symbian
    Replies: 9
    Last Post: 2008-05-20, 17:18

Posting Permissions

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