Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: Java Blackberry
Hi Every one am newbie to BlackBerry, I was an Android Developer.
 
Know I would like to create BlackBerry Application using java.
 
- I want to create Grid Field with image and text I don't know how o create I seen some basic level Grid Field in BlackBerry docs, but its not perfect one that I need please tell me any one,
 
* How to create Grid Field with Image & text?
* How to create custom grid Field and event handling for each item?
 
Thanks a ton in advance,
 
regards.
 
Murali.
Posted 17-Jan-13 19:05pm
vsarick322

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

GridFieldManager grid = new GridFieldManager(4 ,4 , 0);
Bitmap msg = Bitmap.getBitmapResource("msg.png");
BitmapField message = new BitmapField(msg, Field.FOCUSABLE)
{
    protected boolean navigationClick(int status,int time)
    {
       label.setText("Messages");
       Dialog.alert("Message icon selected");
       return true;
    }
};
message.setBorder(border);
Bitmap logs = Bitmap.getBitmapResource("calllogs.png");
BitmapField call_logs = new BitmapField(logs, Field.FOCUSABLE)
{
    protected boolean navigationClick(int status,int time)
    {
      label.setText("Call logs");
      Dialog.alert("Call Logs icon selected");
      return true;
    }
};
call_logs.setBorder(border);
grid.add(message, 0);
grid.add(call_logs, 1);
grid.add(contacts, 2);
grid.add(internet, 3);
grid.add(calendar, 4);
grid.setColumnPadding(13);
grid.setRowPadding(13);
add(grid);
message.setFocusListener(this);
call_logs.setFocusListener(this);
if you are using images you can use this else you can use labelfield
Try using this and You can also set focus on it..
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 410
1 Jochen Arndt 200
2 Richard MacCutchan 135
3 DamithSL 105
4 PIEBALDconsult 90
0 OriginalGriff 6,045
1 DamithSL 4,601
2 Maciej Los 4,032
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,220


Advertise | Privacy | Mobile
Web02 | 2.8.141220.1 | Last Updated 19 Jan 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100