BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 07-15-2008, 02:12 AM   #1
abhsax1978@hotmail.com
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 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 08:33 AM..
Offline  
Old 07-17-2008, 08:38 AM   #2
abhsax1978@hotmail.com
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
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, 08:40 AM   #3
abhsax1978@hotmail.com
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
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
abhsax1978@hotmail.com
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
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
simon.hain
CrackBerry Addict
 
Join Date: Apr 2005
Location: hamburg, germany
Model: 8900
Carrier: o2
Posts: 838
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



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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


LCD Digital Multimeter Voltmeter Ammeter Ohmmeter Volt AC DC Tester Leads Meter picture

LCD Digital Multimeter Voltmeter Ammeter Ohmmeter Volt AC DC Tester Leads Meter

$9.95



5/10Pcs DC 100V 10A Digital Voltmeter Ammeter LED Amp Volt Meter Current Gauge picture

5/10Pcs DC 100V 10A Digital Voltmeter Ammeter LED Amp Volt Meter Current Gauge

$21.98



Digital Multimeter Tester AC DC Volt Ohm Amp Clamp Meter Auto Range LCD Handheld picture

Digital Multimeter Tester AC DC Volt Ohm Amp Clamp Meter Auto Range LCD Handheld

$9.95



Digital Multimeter AC DC Voltmeter Ammeter Ohmmeter Volt Tester Meter DM850 picture

Digital Multimeter AC DC Voltmeter Ammeter Ohmmeter Volt Tester Meter DM850

$7.95



Digital Multimeter Voltmeter Ammeter AC DC Volt Ohmmeter Tester Meter Auto Range picture

Digital Multimeter Voltmeter Ammeter AC DC Volt Ohmmeter Tester Meter Auto Range

$9.95



Genuine Husqvarna 532122822 Ammeter 15 AMP Fits Craftsman AYP 121433X 122822X picture

Genuine Husqvarna 532122822 Ammeter 15 AMP Fits Craftsman AYP 121433X 122822X

$19.58







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