BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 07-15-2008, 03:12 AM   #1 (permalink)
Thumbs Must Hurt
 
abhsax1978@hotmail.com's Avatar
 
Join Date: Jun 2008
Location: NOIDA
Model: 8100
OS: 4.2.1.91
PIN: 2052AEF9
Carrier: Soft. Engg.
Posts: 111
Post Thanks: 4
Thanked 0 Times in 0 Posts
Post Display Bitmap with Title

Please Login to Remove!

Hi,
I want to display Bitmap (Image) to the left side of the title in the List-Field.
How can I possibly do that? attaching the image so that you can have picture what to do.
Regards and thanks in advance.

Last edited by abhsax1978@hotmail.com : 07-17-2008 at 09:33 AM.
Offline  
Old 07-17-2008, 09:38 AM   #2 (permalink)
Thumbs Must Hurt
 
abhsax1978@hotmail.com's Avatar
 
Join Date: Jun 2008
Location: NOIDA
Model: 8100
OS: 4.2.1.91
PIN: 2052AEF9
Carrier: Soft. Engg.
Posts: 111
Post Thanks: 4
Thanked 0 Times in 0 Posts
Default Got It

That's easy buddy!
  1. Create your own LabelField (extended class)
  2. add an image to it using setImage
  3. if you do that in constructor
  4. create its object and
  5. pass it to the setTitle function of the screen
Offline  
Old 07-17-2008, 09:40 AM   #3 (permalink)
Thumbs Must Hurt
 
abhsax1978@hotmail.com's Avatar
 
Join Date: Jun 2008
Location: NOIDA
Model: 8100
OS: 4.2.1.91
PIN: 2052AEF9
Carrier: Soft. Engg.
Posts: 111
Post Thanks: 4
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by abhsax1978@hotmail.com View Post
That's easy buddy!
  1. Create your own LabelField (extended class)
  2. add an image to it using setImage
  3. if you do that in constructor
  4. create its object and
  5. pass it to the setTitle function of the screen
now the constructer must say:
super(title, FIELD_LEFT);
Offline  
Old 11-18-2008, 06:55 AM   #4 (permalink)
Thumbs Must Hurt
 
abhsax1978@hotmail.com's Avatar
 
Join Date: Jun 2008
Location: NOIDA
Model: 8100
OS: 4.2.1.91
PIN: 2052AEF9
Carrier: Soft. Engg.
Posts: 111
Post Thanks: 4
Thanked 0 Times in 0 Posts
Default

PHP Code:
 protected void paint(Graphics g) {
        
super.paint(g);
        
invalidate();
        
int width bmp.getWidth();
        
g.drawBitmap(getContentLeft(), getContentTop(), widthbmp.getHeight(), bmp00);
    } 
setTitle with the setImage is obsolete so you can use paint as above.
__________________
having new s for developers!!!
Offline  
Old 11-18-2008, 09:58 AM   #5 (permalink)
CrackBerry Addict
 
Join Date: Apr 2005
Location: hamburg, germany
Model: 8900
Carrier: o2
Posts: 838
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

is this some kind of alternate reality game? or are you just enjoying to have a little talk with yourself?

while your original question is quite old, here is an answer nontheless:
if you want a listfield to display a bitmap and some text you have to use the drawcallback of the listfield to implement the painting yourself.
for example:
PHP Code:
public void drawListRow(ListField listFieldGraphics graphicsObject objectint yint width) {       
graphics.drawImage(0y6464picture000);
graphics.drawText("text",70,y);

__________________
java developer, Devinto, hamburg/germany
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





Copyright 2004-2014 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.