Kotibab
Kotibab

Reputation: 85

Changing part of the screen in when button clicks in Blackberry

I have three buttons in on screen,when i click each button it navigate to corresponding button contends.i need to change part of the screen without changing whole screen.Can anyone give an idea about this.

Thank You

Upvotes: 0

Views: 179

Answers (2)

Juanma Baiutti
Juanma Baiutti

Reputation: 637

Besides Ray's answer I think you should look to replace method:

 vfm.replace(oldField, newField);

On a thread:

public void run() { //this is your Runnable for your Thread
//do stuff
UiApplication.getUiApplication().invokeLater(new Runnable() {
    public void run() {
        vfm.replace(oldField, newField);
    }
});}

Upvotes: 1

Ray Vahey
Ray Vahey

Reputation: 3065

Generally speaking if you modify a manager you should invalidate that manager which is the way to tell the device a repaint is required.

http://www.blackberry.com/developers/docs/4.0.2api/net/rim/device/api/ui/Manager.html#invalidate()

Edit: information about adding to/deleting from VerticalFieldManager The documentation specific to a VerticalFieldManager is here: http://www.blackberry.com/developers/docs/3.7api/net/rim/device/api/ui/container/VerticalFieldManager.html

The methods you should use to update its child fields are all inherited from the Manager class. You can also see a list of other subclasses here: http://www.blackberry.com/developers/docs/3.7api/net/rim/device/api/ui/Manager.html

E.g. Check the methods for delete, deleteAll, deleteRange, insert, add.

Upvotes: 1

Related Questions