selection of object button switch

Hello, master... Please help me, I have two button options object code... How to swap button A button B and vice versa...

String[] objects1 ={"Indonesia","English","Chinese"};
String[] objects2 ={"Indonesia","English","Chinese"};

ChoiceB1 = new ObjectChoiceField("From:", objects1,0,0)
            {
                public int getPreferredHeight()
                {
                    return 10;
                }

                public int getPreferredWidth()
                {
                    return 240;
                }

                public void layout(int width, int height)
                {
                    setExtent(getPreferredWidth(), getPreferredHeight());
                    super.layout(getPreferredWidth(), getPreferredHeight());
                }
            };
            ChoiceB2 = new ObjectChoiceField("   To:", objects2,0,0)
            {
                public int getPreferredHeight()
                {
                    return 10;
                }

                public int getPreferredWidth()
                {
                    return 240;
                }

                public void layout(int width, int height)
                {
                    setExtent(getPreferredWidth(), getPreferredHeight());
                    super.layout(getPreferredWidth(), getPreferredHeight());
                }
            };  

            HorizontalFieldManager fieldmanager = new HorizontalFieldManager(USE_ALL_WIDTH);
            fieldmanager.add(ChoiceB1);
            fieldmanager.add(ChoiceB2);

                this.add(fieldmanager);

One way you can do it like this,

 ChoiceB2 = new ObjectChoiceField("   To:", objects1,0,0)
 {
       public int getPreferredHeight()
        {
            return 10;
        }
        public int getPreferredWidth()
        {
            return 240;
        }
        public void layout(int width, int height)
        {
            setExtent(getPreferredWidth(), getPreferredHeight());
            super.layout(getPreferredWidth(), getPreferredHeight());
        }
   };
 HorizontalFieldManager fieldmanager = new HorizontalFieldManager(USE_ALL_WIDTH);
  fieldmanager.add(ChoiceB1);
  fieldmanager.add(ChoiceB2);
  this.add(fieldmanager);
  ChoiceB2.setEnabled(false);
  ChoiceB1.setChangeListener(new FieldChangeListener()
  {
    public void fieldChanged(Field field, int context)
    {
        ChoiceB2.setEnabled(true);
        }
});

Tags: BlackBerry Developers

Similar Questions

  • When I create any object and select the object I can't resize

    Hello

    I have a version of the track of the Illustrator, something I problem with my selection tool when I select any object or text I can't resize it there are no show any option for this, happens on the last day. I have reset my Illustrator, but it still has problem. Please give me a solution.

    Thank you

    umangkansagra,

    How about Ctrl / Cmd + Shift + B to switch between showing and hiding the bounding box?

    Absence of any (other) cause/cure, try the list:

    Sometimes, (some) things may fail or stop working for no apparent reason. When (other) possible reasons/remedies do not work, it is perhaps a kind corruption (temporary or permanent), or even preference settings which disturbs, which can be cured with something on the following list put in place in order to provide a catch-all solution for otherwise intractable cases. It starts with a few easy suggestions and safe) 1 and 2) for cases less serious and goes two ways 3) and 4) to reset the default preferences (easily but irreversibly and more laboriously but more completely and also reversible), then follows a list 5) various other possibilities, and it ends with a complete reinstallation 6). If no other suggestion doesn't work, or if no other suggestion appears, you can start on the list and decide how to go or who can apply.

    The following is a general list of things, try when

    (A) the question is not in a specific file,

    (B) you have a printer installed, connected and turned on if it's a physical printer (you can use Adobe PDF/Acrobat Distiller as a printer by default without the need to have a printer on, of course you will need to specify when you really need print on paper), and

    (C) It is not caused by problems with opening a file from external media (see below).

    You tried/made some of them already; 1 and 2) are easier for temporary strangenesses and 3) and 4) specifically may be corrupted/inconvenient preferences); ((5) is a list in itself and 6) is the last resort.

    If possible / there is, you must record a current work first, of course.

    (1) close Illy and open again.

    (2) restart the computer (you can make up at least 5 times);

    (3) close Illy and press Ctrl + Alt + Shift / Cmd + Option + shift during startup (easy, but irreversible);

    4) move the folder (follow the link with this name) with closed Illy (more tedious but also more thorough and reversible), for CS3 - CC you can find the file here:

    https://helpx.Adobe.com/Illustrator/KB/preference-file-location-Illustrator.html

    5 look through and try the relevant among the other options (click on the link with that name, item 7) is a list of the usual suspects among other applications which can disturb and confuse Illy, point 15) applies to the maybe CS5, CS6 and CC);

    Even worse, you can:

    6 (A) uninstall (check the box to delete the preferences, if any), B) run the cleanup tool (if you have CS3/CS4/CS5/CS6/CC) and C) reinstall. It is important to use this step three way: otherwise, things may persist.

    http://www.Adobe.com/support/contact/cscleanertool.html

  • error on the selection of object in ILLUSTRATOR CC

    Hi all, I have problem with object selection in illustrator CC, when I select the current object it will also choose the other object, I can not select the object I want, not on the group or the clipping mask... always to highlight both. It often happen when I've done so vector object. any help from you guys is so appreciated...

    Thank you

    Creig

    It happened through so many versions that I remember most when I met first it.

    One thing works only occasionally when you get such a choice of "ghost";

    Create another object (a small square or other).

    Select it. Your new object and spirit will be selected at this point.

    Align using one of the alignment buttons, any.

    Immediately cancel the move (Cmnd/Ctrl + z) and deselect your new object. On the nine times out of ten the ghost selection will be gone as well. If so, you can remove your superfluous object and continue to work (until next time).

    It does not always work. But it is faster than a reboot when it does.

    -OB

  • Illustrator of hanging or hesitating when I select an object

    Hey guys, I have a question, and I know I can't be alone on this.

    I got a problem for the last few months with Illustrator CC hesitant when I select an object. It happens randomly. I might be selection of text, a picture, a form, an anchor point, whatever it is.

    Here's what happens:

    I select an object with the direct Selection tool and (without maintaining the mouse button) move my cursor to the next object.

    Instead of being selected, there will be a noticeable delay, and after about half a second, the object that I selected just follow my cursor as if I had clicked and dragged, then released.

    It happens more often when I select multiple objects to make a gesture or a group or just something to a certain number of things, but it happens only with several objects. Whenever this happens, I have to cmd + z and reselect it. It's super annoying when I just spent a good amount of direct time by selecting some anchor points and I have to go all the way back and do more. It's absolutely destroy my workflow.

    Also, I know it's not hardware related.

    I have a new MBP 15 inch brand retina 2014. 16gigs ram, core i7, the whole shebang. Apple recently (yesterday) gave me this machine to replace one of the identical specifications, because I and they determined that shouldn't happen other things happening. Now, I do not think it is more that I have just opened illustrator for the first time, and whaddya know. I had a bunch of other problems with the other computer, and I thought it was just another symptom.

    I use illustrator all day. I have used it for years on less powerful machines. I have a dell of 2011 at home that I use now because of this problem. I am not anything do ram intensive, and that happens not only on the great illustrator documents. It happens in the Mavericks and Yosemite. I'm completely updated in all. I'm not using a fancy or wacom mouse, and it comes up with the trackpad as well.

    I disabled all my extensions and finally understood that this bug is related to BetterTouchTool, which is used to align windows on Windows. Too bad, because I like to have this option, but getting rid of it is better than having to constantly undo. I will update if the problem persists, but I can already see a significant improvement in performance.

  • Selection of objects problem

    I am a new user of Illustrator, but I'm having a problem that I have no sense for me.  I can't select an object without moving it too.

    Steps to re-create the problem:

    1. Create a new document in Illustrator
    2. Match draw 2 rectangles
    3. Choose the "Sélection (V)" tool
    4. Click on and release the left button of the mouse on the rectangle that is not currently selected

    At this point, does not this rectangle is selected.  If I don't move my mouse, it stays like that.

    However, as soon as I move my mouse pixels ~ 10, suddenly, the rectangle is selected and moving with the mouse.  A second later (or almost), the object is automatically deleted.

    It behaves almost as if my mouse button is "stuck".  But I've reproduced it with the on-board trackpad and external mouse.  The "Direct Selection" tool causes the same symptoms.  However, I have not seen all the other functions that do not work as expected.

    It is on a Macbook Pro last generation running Mountain Lion.  The only other CS product I use is Dreamweaver, and I didn't notice any problems.

    I called Adobe tech support and that we have obtained in what concerns the deletion of my preferences.  (that does not affect the question)  However, we have been disconnected twice (without call back twice) and after > 15 minutes waiting for a third attempt, I'm pretty frustrated.

    Thanks for any help or suggestion.

    After a search through the forums, I found someone suggest something that solved my problem.  I add the solution here in the hope that someone else finds it.

    The culprit was entitled Zoom.  Addition of Illustrator to its exclusion list seems to solve the problem.

  • "selection of object by the path only" in Indesign?

    Hi, I have just changed to cs4 to 5.5 and can't seem to select an object, if it is another, even if the top element of a 'none' was complete. I know that I can hold cmd and select "via" objects but in cs4, I didn't need to do it as long as the top item had no fill. This preference can be enabled/disabled through the "selection of object by the path only" checkbox in illustrator, but I can't seem to find it in Indesign. Maybe I'm lazy who want to simply do not press the cmd button but it's just annoying the hell out of me for any clarification would be much appreciated.

    Ant.

    Hey Ant,.

    You use the 'Frame' Rectangle tool or the tool 'Rectangle '? I find that I selected the 'Frame' Rectangle tool, it will always be the selected object, even if it has no fill; using the "Marquee" tool, if it has no fill, you can select the objects below it without going through CMD-click.

    Hope that helps,

    See you soon!

    Mikey

  • Select a radio button via javascript

    Is it possible to select an option button using a script?

    I'm trying to select a radio button with the 0 value in a group called Department if a radio button with a value of 0 is selected in a group called TimeofCall.

    I tried this and several variants:

    If

    ((this. TimeofCall.rawValue == 0))

    {

    xfa.host.messageBox ("day is selected.");

    This. Department.rawValue

    == 0;

    }

    I get the message, so I know he checks the TimeofCall group but I can't seem to select an option button in the Group of Department.

    Any ideas would be appreciated.

    -Kevin

    You are the syntax is a little messed up.

    'This' is used to refer to the current object.

    Thus, assuming that the value you are testing is the current focus of basic education should be along the lines of:

    If (this.rawValue == 0) {}

    RadioButtonList.fieldname.rawValue = 0;

    }

    else {}

    //}

    If you test another area, it would be:

    If (fieldname.rawValue == 0) {}

    RadioButtonList.fieldname.rawValue = 0;

    }

    else {}

    //}

    Hope that helps! Going from memory for the moment...

  • Wait for the user to select the OK button

    For my application, I can't use a simple MessagePopup where the user must select the OK button to continue.

    I created a new Panel with just a text message and an OK button to act as a MessagePopup.

    When I call InstallPopup and the box pops up that I have to wait until the user selects OK before continuing as the MessagePopup.

    How can I accomplish this?

    Thank you!

    John W.

    The popup has no effect on the mouse: it can happen that you have a function that manipulates the cursor before the popup is displayed? A SetWaitCursor (1); would be sufficient.

  • InDesign - newbie question - I can't select several objects...

    Shift + click only selects an object at the same time, it turns off when I select the next object...  By dragging the marquee of the editing table always selects the page frame.  Is there a setting somewhere to be changed?

    And where is hidden the Lasso tool?  It work?

    Thank you!

    Try InDesign Visual Quickstart Guide of Sandee Cohen CC. It is the best guide for beginners to InDesign.

    Or course InDesign CC 2015 Essentials of David Blatner on Lynda.com. 10 day trial for free.

  • Why do I need to select the next button twice to move forward in my quiz

    I have a number of true/false and multiple choice questions in this project.  The user still has 2 attempts to get the correct answer with your comments.  When they are done with the question they are asked to select the button "next".  Selecting the next button does not advance the slide of the first time well.  You must always select a second time.  I played with adjust active and inactive times on the timeline, but that doesn't seem to have anything to do with it.  Remove the 'next' button is not an option at this stage because it is mentioned in the audio commentary for each answer to each question. Any ideas?

    If you insert a slide of questionnaire based on the model of default slides, normal stacking order is that the next button is below the Clear key. Maybe you had already removed the Clear button? Try to use Arrange to change the stacking order.

    You do not click the next button twice, you must click the button submit once, then press on Y or click the slide. If the suspension point is far from the end of the slide, it will take a while, if actions are left to "continue". Change the point to pause to be near the end of the slide.

  • Selection of objects by crossing, no window

    Requires the object selection tool now allows you to select the object in the entire window, rather than just go through the object. I tried to hold ctrl, shift, and really anything else I can think of. Is it possible to use the select object tool and select both lines 30 +? I can't use the window as I would be by removing everything that surrounds the objects that I'm trying to delete.

    Thank you

    Shea

    On a mac, using Acrobat DC: I found that Opt + drag allows me just to cross the edges of objects to select several objects.

    Using Acrobat XI, Opt and Cmd + drag, drag had the same effect of allowing me to select several objects just across borders, without having to draw a marquee around each of the objects.

    Alternatively, if you have Illustrator, you can edit the page using Illustrator. Select some objects (or objects with Cmd + A), then make a right click Change t with Illustrator.

  • Animations, and multi-state object buttons

    Is it possible that I can have a button that works with animations, into a multi-state object?

    When buttons, that departure/return animations, convert into multi-state objects, buttons to lose functionality and I can't have their target in the menu animation.

    Use the edge or convert animations using in5 to overlays of web.

    Just to be clear... we are talking about DPS here, right? Not EPUB or publish online?

  • By selecting multiple objects - change suddenly

    I swear to God that this morning I could SHIFT-click ON various objects to select. Now I can only select one. That's happened? Can someone help me understand this? I want to select several objects (text, images etc) and cannot do it anymore.

    Thank you for your time.

    Hello

    This could be the various scenarios that may cause this problem.

    1. Please make sure no objects are locked. You can unlock a object > unlock all on page.

    2. Please create a new site or a new page and check if Shift + click works for you.

    3. so what happens with the new file and new site also then restart the computer and check if it works.

    If the problem persists then please let me know which operating system you are using.

    Concerning

    Vivek

  • Hello, in indesign 2015 at the pallet level, when I select an object I can't find colorful peas and pencil!

    Hello, in indesign 2015 at the pallet level, when I select an object I can't find colorful peas and pencil! Please can you help me solve this problem?

    Thank you

    It is indesign CC 2015

    Schermata 2015-07-28 alle 10.17.56.png

    It is indesign CC 2014

    Schermata 2015-07-28 alle 10.42.51.png

    Hello! Sorry for my English!

    I manually deleted the preferences of the library after the suggestion of Peter, but it does not work

    Then I tried to start Indesign by pressing the Ctrl + Cmd + Opt + shift and now it works properly!

    I hope that I have explained myself!

  • Impossible to select several objects

    Don't know what I did, but I can't select several objects at once. I command you to click and he chooses the latter only? Help!

    Restart the computer Muse\your.

Maybe you are looking for