Discussion Board

Results 1 to 5 of 5
  1. #1
    Regular Contributor knights123's Avatar
    Join Date
    May 2009
    Posts
    96
    Hi,

    How to build a drop down box in j2me Canvas?

    I have tried doing it in form using ChoiceGroup.POPUP, it works.

    But i want to do it in a canvas. Can anyone help me?

  2. #2
    Super Contributor ingsaurabh's Avatar
    Join Date
    Apr 2009
    Posts
    572
    I dont know about J2me but in blackberry U can customize everything
    earlier I was also trying to do this and found some +ve results
    as guage is already converted to low level GUI (found in wiki)

    I suggest to build class extending Canvas and using its paint method to suit your needs
    Regards,
    Saurabh

  3. #3
    Regular Contributor manjul_saini's Avatar
    Join Date
    Jan 2008
    Posts
    387
    Hi, i cnt write code for you, just could give you idea, take a vector and add all the elements in it, in paint method of canvas, draw it, on key press(fire or lsoft key) simply draw all the elements of vector on canvas.
    Thanks and Regards,
    Manjul.

  4. #4
    Nokia Developer Champion raj_J2ME's Avatar
    Join Date
    Mar 2008
    Location
    The Capital of INDIA
    Posts
    4,314
    Quote Originally Posted by knights123 View Post
    Hi,

    How to build a drop down box in j2me Canvas?

    I have tried doing it in form using ChoiceGroup.POPUP, it works.

    But i want to do it in a canvas. Can anyone help me?
    Hi,
    You can take the all items as Manjul has described,in the vector or in the string array.
    Then you also take the image with the shape of the choice box and draw.In that draw the items when user select the same.Like on the fire key pressed,draw the items after reading from the vector or array.Take a int variable for keeping track for the current selection implementation,
    Hope that this make some sense.
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

  5. #5
    Registered User juarezjunior's Avatar
    Join Date
    Dec 2005
    Location
    Brazil
    Posts
    1,883
    Hi,

    When using Canvas you must take care of everything yourself, no tricks here. Raj has given you a good starting point, you can also look for some open source code on the web and reuse them.

    Br,
    Juarez Alvares Barbosa Junior - Brazil

Similar Threads

  1. Dropdown List or wheels ?
    By PopAndDestroy in forum Symbian User Interface
    Replies: 1
    Last Post: 2009-02-08, 17:31
  2. Using the font from setting list in custom listbox
    By alav in forum Symbian User Interface
    Replies: 1
    Last Post: 2008-11-05, 17:17
  3. Changing Canvas on a Display?
    By cjohnstone in forum Mobile Java General
    Replies: 1
    Last Post: 2008-03-04, 00:26
  4. Execute a Canvas in one file from def in a nother??
    By Christian V Petersen in forum Mobile Java General
    Replies: 0
    Last Post: 2005-03-10, 12:25
  5. Bluetooth Virtual Serial Port
    By mealos in forum Bluetooth Technology
    Replies: 2
    Last Post: 2004-12-03, 03:46

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved