Focus on the specific button

Hello! I'm new with this!

Here's my problem:

I make an aplication that show a bunch of photos, the thing is that I'm using 2 buttons! the first to show previous picture and seconds to display the next image.

When I ask the next photo (Pentecost of second push button) I want to again focus the second button, but it does not work and I do not know how...

When I ask this question the next photo, the new screen is pushed and the first button's focus, like this photo

How can I configure the managers to keep the focus of the second button?

Here is my code

HorizontalFieldManager hfm = new HorizontalFieldManager();
            VerticalFieldManager vfm = new VerticalFieldManager(Field.FIELD_HCENTER );

            prev = new screen("<", screen.COLOUR_BACKGROUND, Field.FOCUSABLE );
            prev.setChangeListener(boton);
            hfm.add(prev);

            EncodedImage bit = EncodedImage.getEncodedImageResource(_filePath+_num+_ext);
            Bitmap imageScaled = new Bitmap((Display.getWidth() - 50) , Display.getHeight() );
            bit.getBitmap().scaleInto(imageScaled, Bitmap.FILTER_LANCZOS);
            BitmapField bmf = new BitmapField(imageScaled);
            hfm.add(bmf);

            next = new screen(">", screen.COLOUR_BACKGROUND, Field.FOCUSABLE | Field.HIGHLIGHT_FOCUS);
            next.setChangeListener(boton);
            hfm.add(next);
            vfm.add(hfm);

Sorry for my English = (and thank you!

Welcome to the forums!

Just tell the Manager to set the focus to the desired button, when it is displayed (and probably exposed).

Replace your

VerticalFieldManager vfm = new VerticalFieldManager(Field.FIELD_HCENTER );

with something like

VerticalFieldManager vfm = new VerticalFieldManager(Field.FIELD_HCENTER ) {
  protected void onDisplay() {
    getField(2).setFocus();
  }
};

or, better yet, set your neighbor as

next = new screen(">", screen.COLOUR_BACKGROUND, Field.FOCUSABLE | Field.HIGHLIGHT_FOCUS) {
  protected void onDisplay() {
    setFocus();
  }
};

Good luck!

Tags: BlackBerry Developers

Similar Questions

  • Keep the focus on the same button

    I have two vertical frames side by side. The left one has a few buttons and the right one has something else that is not active. When I click on the third button on the left, it is highlighted. If I do something on the right, the cursor automatically placed on the first button on the left. The behavior I want, it's the third button highlighting. The focus is changed only when I click on another button on the left.  At this time the focus is changed for the new button, I clicked.

    How can I keep a button on the left highlighted?

    Thank you

    If you have to setFocus on a specific button, you have to setFocus in a separate thread. Use this piece of code:

            protected void threadSafeCursorSetting()
            {
                PingerMain.getUiApplication().invokeLater(new Runnable()
                {
                    public void run()
                    {
                        listen.setFocus();
                    }
                } );
            }
    

    where listening is a button.

    Press the button Bravo thank the user who has helped you.

    If your problem has been resolved then please mark the thread as "accepted Solution".

  • Set the focus on the specific field when the form opens

    I use Acrobat Pro XI.  I would like for a specific domain focus when the form is opened.  Is there a form parameter or the Javasprict that should be used?  Where add Javascript code so that's the direction I must go?  Thank you.

    Yes, it can be done using a script. Go to tools - JavaScript - Document JavaScripts and enter this code (adjust the name of the field as your file, of course):

    this.getField("FieldName").setFocus ();

  • Move the focus of the custom button

    Hello

    My button did to paint two differrent bitmap:

    Paint (Graphics g)

    {

    g.isDrawingStyleSet (Graphics.DRAWSTYLE_FOCUS)? FOCUS: NORMAL;

    g.drawBitmap (0, 0, getPreferredWidth(), getPreferredHeight(), _bitmaps [index], 0, 0);

    ...

    }

    How do I call it g.setDrawingStyleSet (Graphics.DRAWSTYLE_FOCUS, false) to navigationUnclick (State of the int, int hour). To make the button unfocus after a click.

    removeFocus() didn't work?

    clues will be a great help.

    This will work as long as the button is focused. You can add a custom boolean to change the drawing, or move the focus to another field.

  • DVS/A,PSE,14.0.MAC,GEN,UE,COSTCO.    HOW CAN I GET THAT?  I TRIED MANY TIMES.  NEED OF 24 CHARACTERS, WHICH?  I FOCUSED ON THE REDEEM BUTTON AND STILL DOES NOT WORK.  I HAVE PHONE 800-642-362.  FIRST GUY HAS HUNG UP.  2ND IS SAYS NO

    ADOBE SUCKS

    Since this is an open forum, not Adobe support... you must contact Adobe personnel to help

    Chat/phone: Mon - Fri 05:00-19:00 (US Pacific time) <===> NOTE DAYS AND TIME

    Don't forget to stay signed with your Adobe ID before accessing the link below

    Serial number and activation support (non - CC)

    http://helpx.Adobe.com/x-productkb/global/Service1.html

  • Setting the focus to a specific index

    Let's say I'm a manager of vertical field with 5 buttons fields. Is it possible to move the focus to a specific field click?

    For example, clicking on the 2nd button will move the focus to the 4th button. Possible?

    Yes, you can set the focus...

    Try this...

    ' Public Sub fieldChanged (field field, int context)
    {
    If (MyButtonField instanceof Field)
    {
    If (Field == VFM.getField (1))
    {
    (VFM.getField (0)) .setFocus () (ButtonField);
    }
    }
    }

    This will focus on the ground in the 1st row on the click event of the button 2nd...

    Similarly, you can write changeListner event for all fields.

  • What settings should I use for the rear button focus put in place for the d5 mark 3? TIA

    5 d Mark 3

    When you press the menu button, highlight on (using the knob on the front of the camera) menu "C.Fn2: disp.» "/ Operation" orange. (it's the icon of a camera that has an index of points for a light meter below - right of the wrench, to the left of the star icon).

    Each of these menus on the 5 d III have several pages.  This is the 2nd page (the 2nd point from left to right) who has the category of "custom controls".  Note that (using the wheel on the back this time) and click on the set"" button.

    Which displays a menu showing each of the important controls on the back of the camera and what they do.  Highlight the icon for the shutter button (this modifies the behavior of a half-press) and change to 'measure and AF start' to just 'start of counting.

    "AF-ON" button (on the back of your camera) is probably already put 'measure and AF Start' (I think that this is the default factory setting).

    If you're not so much focus to enable back-button (which is probably already active) you're more "power off" the focus when the shutter button is pressed to halfway.

    Good luck

  • No KeyPress triggered if the mouse button is held on the control

    Hi all

    I am trying to catch the outfit/auto repeating keyboard inputs at the same time I'm clicking on a slide ring switch, to change the direction of the slide of entry as a Shift key.  (actually, I would like to use the SHIFT key, but apparently not raise events keypress at any time, so I resorted to letter keys).  I check for the KeyPress in the recall of Panel, it fires well if no mouse btns are in a hurry, or if they are pressed on indicator or decorations on the Panel.  But as soon as I click on any control with an active entry, all keypress events stop until the mouse button is up, then keypress starts shooting again, completely defeat the purpose of simultaneous inputs.  I put the test code in the callback of slide control, and it does not receive the keypress events or if the mouse button is pressed, if it does if it has focus, but the mouse button is up.

    Any ideas?  I'm still using ver 6.0 if it makes a difference, try to get it to improve myself to 8.0 but try to do something on the old version, while I wait.

    Ken

    I didn't understand exactly what Ken was referring to. Let's try another approach: a reminder of command triggers a LEFT_CLICK or COMMIT event even it the SHIFT key is pressed, to Ken can intercept the desired event and then test the State of the keyboard, in this way:

    If (event == EVENT_LEFT_CLICK) {}
    GetGlobalMouseState (NULL, NULL, NULL, NULL, NULL, &keys);)
    If (keys & VAL_SHIFT_MODIFIER) {}
    MessagePopup ('Event', "shift key is pressed.");

    }
    }

  • Back button focus with the 6 d

    I can't get the focus of the "back" of my 6 d (AF-ON) button to work.  After you follow the instructions on the Canon Website on how to implement, the right button does nothing.  Auto focus works only with the shutter button.  I have the function set to "P" which I understood to be okay.  Reset the camera to factory would help?  I'd rather not have to send the camera to Canon for repair of a single button.  Case of the unit was bought new and is still under warranty.

    Thank you

    Glad to hear you got BBF put in place. It takes a bit of practice, but soon becomes second nature for emphasis in this way.

    I don't know what you mean by "choice of the AI Servo.

    Are you new on Canon cameras and systems development? Just in case you are...

    Like most Canon cameras, the 6 d has three modes of automatic update: One Shot, AI Focus and AI Servo.

    One Shot is intended for stationary subjects. The update is performed, then stops and locks, and Confirmation of development is given (the Green LED in the viewfinder, red flash of the AF point in the viewfinder, and if it is enabled, the "beep"). If it moves, you or the subject, or if you change the focal length of the zoom, to refocus you must lift the pressure completely on the button update (whether of BBF or a half press of the shutter button), then reapply.

    It is very important to remember is when you use a zoom, since most modern are "varifocale" designs that does not maintain focus when the focal length is changed by zooming. If you use only one zoom, you need either: set the focal length first, before focusing. Alternatively, do not forget to refocus after zooming. Or, use instead the AI Servo.

    Because development stops and locks after that he is suffering from a sudden, it's a good way if you use a technique of "focus and recompose.

    AI Servo is designed for use with moving subjects. In fact, this is the mode to use each time the distance of the photographer and the subject changes for any reason, or if using a zoom and by changing the focal length. HAVE Servo will never block. Constantly, it measures the distance and updates the development, as long as keep you the pressure on the back button or hold down the shutter button depressed half, depending on how you have the camera set up.  HAVE Servo crashes ever, so there is no Confirmation of focus given. You must learn to trust the camera and yourself. It's working properly.

    HAVE unusable Servo with the technique of "focus and recompose", except BBF is used. If the shutter button is always activated AF, it will cause the camera to focus elsewhere, when you try to take the picture after the restructuring. However if using BBF, all you have to do is raise the pressure of your thumb on the button to stop the development, allowing the use of AI Servo with "focus and recompose.

    HAVE Servo is also ideal for use with zooms varifocale... given that the focus is continually updated the focal length of the lens is changed.

    But he can be very good, AI Servo is not quite exact to the One Shot can be. So critical attention, when possible, use One Shot (Note: Live View and separate focusing system used is even more precise, although it is slower.) Much slower on most of the models... 70 D has a new system that improves a little focus Live View).

    AI Focus is not actually a mode of development at all. He is supposed to decide for you, the subject is in motion or not and then move to the use as appropriate: One Shot or AI Servo. Frankly, I almost never use this mode. It may be better with the modern, but older cameras I tried it had a delay while the camera was "decide" mode to use, and which led me to miss some shots. Also, I prefer to choose my own mode of development, and since I use BBF, I can just leave my cameras in AI Servo most of the time. The word 'pro' oriented Canon models (1 d series cameras) have even an AI Focus mode. They have just two: One Shot and AI Servo.

    There are a few "tweaks" to the AF systems, depending on the camera model, for example to set the priorities for follow-up or the ease with which "distracted" the AF system is if something momentarily intrudes between you and the subject.  Consult your instruction manual for that specific adjustment can be made with 6 d... I don't have so can't tell from experience.

    There is a very useful series of three videos on auto focus systems Canon on YouTube, posted by B & H Photo and Rudy Winston of featuring Canon USA... Each video is long about half an hour and the first one is: highly recommended http://www.youtube.com/watch?v=iAx86nblZ2g , watching all three for additional info, even if they are a few years now and don't specifically talk about the focus 6 d system (5 d Mark II and the original 5 d AF systems are quite similar to 6 d, except that they have less than two points and have 6 in option hidden 'help' points available in AI Servo mode).

    I hope this helps.

    ***********
    Alan Myers

    San Jose, California, USA.
    «Market softly and carry a great lens.»
    MATERIAL: 5DII, 7D(x2), 50D(x3), some other cameras, various lenses & accessories
    FLICKR & REPROGRAPHY

  • focus on something specific to the JSF page

    How we can focus on something specific to the JSF Jdev 11g page.
    In our use case user chose something of a radio button that he wanted to focus on a specific page element.
    Thank you.

    I don't think so. Another thing is to insert some JavaScript to code page (backing bean):

                    FacesContext facesContext = FacesContext.getCurrentInstance();
                    ExtendedRenderKitService service = (ExtendedRenderKitService)
                    Service.getRenderKitService(facesContext, ExtendedRenderKitService.class);
                    service.addScript(facesContext, "alert(\"Hello!\");");
    

    Pedja

  • Keep the Focus on the button after mouse click

    Hello

    I have a button in my VI that triggers a function. I would like to know how can I keep the focus on the button after clicking with the mouse over it? I ask that because I want that after the first click, the focus is kept on the button then I can activate the button with the space bar.

    I know I can hit the button with "tab" and then use SPACEBAR, or I can put another key to toggle this button.   But the behavior that I'm trying to get is: 'after the first click on the button for the first time, emphasis is stored on it and then I can use the space bar to activate the button.

    Ideas?

    Thank you.

    Dan07.

    I found the solution. Using a property node, set to True KeyFocus.

    Thank you.

    Dan07.

  • Open the page of the specific tab button

    Hello

    How can I make this specific page open a button on tab.

    This page has been disabled and I menaged to do my program to view this page, when I click on a button. So next step which would be by clicking on this button it (previously disabled - invisible) page OPENS automatically.

    Chata,

    Use the nodes property.  First, get the page references.  In this table, select the specific page reference.  Then write the Page Enabled in the Enabled property of the Page. After that, write the page value in a local variable (if the tab is a control) or write the value directly in the terminal if the tab is an indicator.  Close references.

    Lynn

  • Workin in Live View mode when I press the zoom button to focus, I get a white screen with an x 5 or a wr 10 x

    Working in Live View when I press the zoom button to focus, I get a white screen with an x 5 or x 10 written.  I do not get the image of zoom.  He just started this today and I used it for years.  Any help?  Thank you.  OH, I have a 450 d (rebel xsi)

    Thank you very much

  • I'm unable to deselect specific fields when you set the Reset button in a form.  I can only "select all" or "deselect all". Someone at - it happen?

    I'm unable to deselect specific fields when you set the Reset button in a form.  I can only "select all" or "deselect all". Someone at - it happen?

    Yes, this is a common problem. Use the SPACEBAR to toggle individual mailboxes.

  • Firefox Inspector not to focus on the element by click on inspect.

    The new firefox for developers is out, I downloaded and used as your primary browser.
    However, I discovered that the Inspector not to focus or show the direct element that I inspected. He just open the inspector window & show the tag of the whole body.
    Is this something new to Firefox? or from the Add-ons of mine?

    This happens to you all the time or only in specific cases?

    This can happen if the elements are no longer present if the focus is removed from the web page that will happen if you try to inspect the item via the context menu.

    Start Firefox in Safe Mode to check if one of the extensions (Firefox/tools > Modules > Extensions) or if hardware acceleration is the cause of the problem.

    • Put yourself in the DEFAULT theme: Firefox/tools > Modules > appearance
    • Do NOT click on the reset button on the startup window Mode safe

Maybe you are looking for

  • Can't burn DVDs with my Satellite U500 (PSU9ME)

    When I try to burn a DVD, I get this message: The disc is not burned properly, make sure that you have installed the latest firmware for your CD / DVD and try again

  • strain of understanding using NI9236

    Hello I use a cRIO 9073 with a NI 9236 to measure the strain gauges. I use a modified version of the NI9236 project to start in the folder examples of Labview, make my collection of data. I then use another vi to my shift, average and converting micr

  • Windows Server 2012 and Google Cloud Print

    Someone at - it problems using Google Cloud Print WinServer 2012?  PC Win7 and ChromeBooks see the printers and copiers as in offline mode.  The print service is not stopped, but he must restart it several times a day.  We still live with a utility t

  • system recovery compaq

    When I try to do the system recovery it says no bootable device so how can I do this and save my file of all the

  • 9050: HP LaserJet 9050 printer

    Could you help me check it is this model can be printing/scanning through wireless? Could you let me know the wireless configuration link where? Best regards