Add or remove field on VerticalFieldManager

Hello

I have a problem about adding and removing fields on/to go vertical Manager after posting it. even if I used the invalidate() method to redraw the VerticalManager

Here is my code, please I need a help

public class TestingScreen extends MainScreen {

    public static VerticalFieldManager mainVerticalManager;
    public LabelField label1 ,label2;   

    public TestingScreen()
    {
        mainVerticalManager = new VerticalFieldManager();
        label1 = new LabelField("Label 1 text",LabelField.USE_ALL_WIDTH);
        label2 = new LabelField("Label 1 text",LabelField.USE_ALL_WIDTH);
        mainVerticalManager.add(label1);
        add(mainVerticalManager);

    }

    private MenuItem menuItem1 = new MenuItem("menuItem1", 0, 1)
    {
            public void run()
            {
                mainVerticalManager.delete(label1);
                mainVerticalManager.add(label2);
                mainVerticalManager.invalidate();
            }
    };

    protected void makeMenu(Menu menu, int arg1) {
        super.makeMenu(menu, arg1);
        menu.add(menuItem1);
    }

}

Thank you

You have debugged your code to prove that you're using this method?

As a hypothesis, however, the field that you add and the domain that you delete are identical, so you won't see any difference.  How to change the text of the label2?

Tags: BlackBerry Developers

Similar Questions

Maybe you are looking for

  • Why can't I just spend 10.7.5 to El Capitan on my early 2008 13 in. MacBook?

    I recently upgraded from 10.6 to 10.7.5. And while I'm happy with it, I thought, since I met the requirements of the system, I would upgrade to El Capitan. So when I went to do, he said I couldn't. From what I can tell, I have enough memory for it. S

  • Center Solutions HP for my PC Windows 7 64 bit Home Premium?

    Hi all Succesffuly I was able to install my printer HP 1400 of all-in-one series with my PC Windows 7 64 bit Home Premium. However, I can't activate the scan function or configure the printer scanning functions, since I don't have the software instal

  • Wireless network option is missing after the virus attack.

    Original title: restore wireless... After the restoration of xp following an attack virus (cridex.e among them), I have no wireless network option.  Essentials of security has not detected any virus 4 who were present.

  • Restore Vista after reformatting (without installation disc)

    I think I read every post on this subject and none seem to solve my problem.  I bought a PC with Vista 64 bit Ultimate and Enterprise Office 2007 eBay.  The two are allowed and I product identification number and keys for both.  NOR is come with the

  • Problems playing and extraction of some discs in WMP

    I have usually no problem playing and ripping disks on my hard drive using WMP (W7). However, I have problems with some types HDCD discs. An example of this is Neil Young's "Greatest Hits", it will not play WMP poster art, the title of the album etc