BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 10-26-2009, 01:14 AM   #1 (permalink)
New Member
 
Join Date: Oct 2009
Model: 9530
PIN: N/A
Carrier: nil
Posts: 1
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default change image at runtime

Please Login to Remove!

Hi friends i am new for blackberry and i am learning things now.

Can anyone help me in changing the image at run time (say on menuclick)

I have tried like this


//

public MenuItem Next = new MenuItem("Next", 110, 10)
{
public void run()
{



img = Bitmap.getBitmapResource(arr[i+1]);
EncodedImage ei = EncodedImage.getEncodedImageResource(arr[i+1]);
BitmapField bf = new BitmapField(ei.getBitmap(), BitmapField.FOCUSABLE );

add(bf);

}

}//


where arr[i] has the array of image names.

I am displaying the first image in normal function itself

But unable to change images on clicking the menu item

It goes into the loop but it is not adding to the display screen



pushscreen()

is in the constructor of main class

Does it like that it needs pushscreen always to change the screen

If so how can i do that.

help me in this regard



Thank you
Offline  
Old 10-26-2009, 06:25 AM   #2 (permalink)
BlackBerry Mensa
 
MidnightDraven's Avatar
 
Join Date: Jan 2009
Location: Chester,UK
Model: 9000
PIN: N/A
Carrier: Tesco Mobile
Posts: 9,481
Post Thanks: 2
Thanked 110 Times in 110 Posts
Default

Totally the wrong place to post
__________________
~Midnight Draven

"That's it then. Cancel the kitchen scraps for lepers and orphans, no more merciful beheadings... and call off Christmas."
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

Tektronix Five-Bay Traveler Mainframe / Power Module (TM 155)
$213.75
Tektronix Five-Bay Traveler Mainframe / Power Module (TM 155) pictureTektronix Mainframe Power Module and AM 503A Current Probe Amplifier
$50.0
Tektronix Mainframe Power Module and AM 503A Current Probe Amplifier pictureGenuine OEM Tektronix TM515 MainFrame W/ DM501A DC508A FG502 TG501 PS503A
$245.99
Genuine OEM Tektronix TM515 MainFrame W/ DM501A DC508A FG502 TG501 PS503A pictureTektronix DSA 602A Touchscreen 3-Slot Digitizing Signal Analyzer Mainframe
$449.99
Tektronix DSA 602A Touchscreen 3-Slot Digitizing Signal Analyzer Mainframe pictureTektronix VX1410 VXI Test Mainframe HP E8491A VX4801 CDS 73A-270 73A-541 Module
$1999.0
Tektronix VX1410 VXI Test Mainframe HP E8491A VX4801 CDS 73A-270 73A-541 Module  picture






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