Note that there are some explanatory texts on larger screens.

plurals
  1. POList field index in blackberry
    primarykey
    data
    text
    <p>I m going through ListField,..I m getting problem when i click on the selected index....</p> <p>I want the code,when i click on the selected index,it is showing all the profiles for the particular index </p> <pre><code> public class ListEmployees extends MainScreen implements ListFieldCallback { ListField list; String[] items= {"Srikanth","Pradeep","Ranjith"}; public ListEmployees() { setTitle("List Screen"); list = new ListField(); list.setSize(3); list.setCallback(this); add(list); } </code></pre> <blockquote> <p>using switch case</p> </blockquote> <pre><code>public void drawListRow(ListField listField, Graphics g, int index,int y, int width) { int a= listField.getSelectedIndex(); g.drawText(items[a], 0, y,0,50); switch(a) { case 0 : g.setColor(Color.GREEN); Bitmap srikanthImg = Bitmap.getBitmapResource("srikanth.jpg"); if(list.getSelectedIndex()==0) showMessage(srikanthImg,"Srikanth","1363"); else break; //Dialog.alert("The selected element is: " + Integer .toString ()); break; case 1 : g.setColor(Color.GREEN); Bitmap PradeepImg = Bitmap.getBitmapResource("pradeep.jpg"); showMessage(PradeepImg,"Pradeep","1303"); break; case 2 : g.setColor(Color.GREEN); Bitmap ranjithImg = Bitmap.getBitmapResource("ranjith.jpg"); showMessage(ranjithImg,"ranjith","1333"); break; default : Dialog.alert("No Information Found !!!"); } } private void showMessage(Bitmap map, String name1, String empId1) { // TODO Auto-generated method stub String data = name1 + "\n"+empId1; UiEngine ui = Ui.getUiEngine(); Screen screen = new Dialog(Dialog.D_OK, data, Dialog.OK, map, FIELD_HCENTER); ui.queueStatus(screen, 1, true); </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload