Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6931691
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T11:36:38+00:00 2026-05-27T11:36:38+00:00

How do I display a list of items where list items can be selected

  • 0

How do I display a list of items where list items can be selected for further action, in a BlackBerry application?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T11:36:39+00:00Added an answer on May 27, 2026 at 11:36 am

    You want to use a ListField. Here is a sample of code that makes use of the ListField.

    class CustomListField extends ListField implements ListFieldCallback 
    {
    public static int x;
    public Vector rows;
    private Bitmap p1;
    int z = this.getRowHeight();
    public LabelField label,label2,label3,label4,label5;
    public CustomListFieldCode(int rowcount,int service_No,String text1,String time)
    {
        super(0, ListField.MULTI_SELECT);
        setRowHeight(3*z);
        setEmptyString("Hooray, no tasks here!", DrawStyle.HCENTER);
        setCallback(this);        
        rows = new Vector();
    
        for (x = 0; x < rowcount; x++) 
        {
            TableRowManager row = new TableRowManager();
            if(x%2==0)
            row.setBackground(BackgroundFactory.createSolidBackground(Color.AQUA));
            label = new LabelField("Service"+x);
            row.add(label);
            rows.addElement(row);
        }
        setSize(rows.size());
    
    }
    
      // ListFieldCallback Implementation
      public void drawListRow(ListField listField, Graphics g, int index, int y,int width) 
      {
        CustomListFieldCode list = (CustomListFieldCode) listField;
        TableRowManager rowManager = (TableRowManager) list.rows.elementAt(index);        
        rowManager.drawRow(g, 0, y, width, list.getRowHeight());
    }
    
    private class TableRowManager extends Manager 
    {
        public TableRowManager() 
        {
        super(0);
        }
    
    // Causes the fields within this row manager to be layed out then
    // painted.
        public void drawRow(Graphics g, int x, int y, int width, int height) 
        {
            // Arrange the cell fields within this row manager.
            layout(width, height);
    
            // Place this row manager within its enclosing list.
            setPosition(x, y);
    
            // Apply a translating/clipping transformation to the graphics
            // context so that this row paints in the right area.
            g.pushRegion(getExtent());
    
            // Paint this manager's controlled fields.
            subpaint(g);
    
            g.setColor(0x00CACACA);
            //g.drawLine(0, 0, getPreferredWidth(), 0);
    
            // Restore the graphics context.
            g.popContext();
        }
    
        // Arrages this manager's controlled fields from left to right within
        // the enclosing table's columns.
        protected void sublayout(int width, int height) 
        {
            // write your code for arranging the elements of the row
        }
    
    // The preferred width of a row is defined by the list renderer.
        public int getPreferredWidth() 
        {
            return Graphics.getScreenWidth();
        }
    
        // The preferred height of a row is the "row height" as defined in the
        // enclosing list.
        public int getPreferredHeight() 
        {
            return getRowHeight();
        }
    }
    
    public Object get(ListField listField, int index) 
    {
        // TODO Auto-generated method stub
        return null;
    }
    
    public int getPreferredWidth(ListField listField) 
    {
        // TODO Auto-generated method stub
        return 0;
    }
    
    public int indexOfList(ListField listField, String prefix, int start) 
    {
        // TODO Auto-generated method stub
        return 0;
    }
    
    
    }
    

    for handling the event Use the “TouchEvent” on each row.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i'm branding an iphone app and the designer wants to display list items using
I am trying to display a list of items in a datagrid from an
My plan is to display a list of items alphabetically in a table view
I am attempting to display a list of items (the style and controltemplate for
We have a scenario where we want to display a list of items and
I have a list of items that I wish to display with a separator
I have a page with a list of elements display (items) - which are
I'm using a QTreeWidget to display some simple items. I've set the list sortable
I have drop down list with 5 items. I want to send the selected
I have a ListCtrl that displays a list of items for the user to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.