Buttons and landscape Manager

Hello

I would like to align two buttons again to each other using the HorizontalFieldManager.

The button one must be on the side more to the left of the screen, another on the right side most of the screen.

I tried this code, but the two buttons are on the left, attached to each other:

     HorizontalFieldManager hfm = new HorizontalFieldManager(Manager.HORIZONTAL_SCROLL);
     hfm.add(new ButtonField("Left Button",ButtonField.FIELD_LEFT));
     hfm.add(new ButtonField("Right Button",ButtonField.FIELD_RIGHT));
     add(hfm);

The 'left' button has style: ButtonField.FIELD_LEFT, it should be left.

The button "right" as the style of ButtonField.FIELD_LEFT and should be on the right - but is not.

Can someone help me on this?

Thank you.

Three frames just to put two buttons seems a bit excessive.

private class MyHorizontalFieldManager extends HorizontalFieldManager {

    private ButtonField leftButton;
    private ButtonField rightButton;

    public MyHorizontalFieldManager() {

        super( USE_ALL_WIDTH );

        ButtonField leftButton = new ButtonField( "Left" );
        setLeftButton( leftButton );
        add( leftButton );

        ButtonField rightButton = new ButtonField( "Right" );
        setRightButton( rightButton );
        add( rightButton );
    }

    protected void sublayout( int maxWidth, int maxHeight ) {

        super.sublayout( maxWidth, maxHeight );

        int width = getWidth();

        //            ButtonField leftButton = getLeftButton();
        //            if (leftButton != null && equals( leftButton.getManager() )) {
        //
        //                int x = 0;
        //                int y = 0;
        //                setPositionChild( leftButton, x, y );
        //            }

        ButtonField rightButton = getRightButton();
        if (rightButton != null && equals( rightButton.getManager() )) {

            int x = width - rightButton.getWidth();
            int y = 0;
            setPositionChild( rightButton, x, y );
        }
    }

    private ButtonField getLeftButton() {

        return leftButton;
    }

    private void setLeftButton( ButtonField leftButton ) {

        this.leftButton = leftButton;
    }

    private ButtonField getRightButton() {

        return rightButton;
    }

    private void setRightButton( ButtonField rightButton ) {

        this.rightButton = rightButton;
    }
}

Tags: BlackBerry Developers

Similar Questions

  • How empy and replace the buttons inside the Manager of horizontal management.

    Hello! So basically, I have 2 buttons at the top of the screen and a set of buttons inside a HorizontalFieldManager (let's call is Set 1 and 2). Now, when I click on the first button it should appear a Set 1 and then appear Set 2 and remove the Set1 on screen. How can I do this? Thank you!

    -Ryan

    The details in the referenced thread, you should get going.

    Basically, you add and remove fields.

    I suggest that you have a Manager to Set 1 and a Manager for value 2.  Add the two managers to the screen, with nothing in it,

    Make sure that Manager 2 is empty (deleteAll) and add fields associated with the value 1 to the Manager for the value 1, when they should be displayed - i.e. trigger it by pressing button 1.

    Remove the fields in Manager 1 and add the fields associated with the value 2 to the Manager for Set 2, when they should be displayed - i.e. trigger this by pressing button 2.

    I hope this helps.

  • buttons and new layout cannot do anything

    Now, I get an extra layer of height. Its like this: high windows have a layer containing nothing, it's a waste of space, next height layer is the tabs in firefox, then finally we're the buttons and the address field. How can I remove the layer of the window? Before with the firefox button in the left corner of the layer of the window has been integrated with it, so I don't loose any height.

    Another problem. I can't move the settings customized to the left button, so I left my mouse have to move anywhere on the screen.

    Another problem of moving. I can't move the reload/stop button. I want that to the left with all the other buttons.
    And why can't I see the forward button? I don't see the attacker when it assumes to be there. I want that it to been seen at any time. And why can not move back/forward buttons? I could only with the latest version.

    OK I have the other problems by installing addon: Restorer Classic theme. Now, everything looks and works exactly as in the 28th. Best layout, everything is close to the other and you need to move your mouse less than distant. You have all the options under firefox button.

    If you do that and your session manager addon does not appear as... button disable the Restorer Classic theme, move the button session manager from the scope of the option meny or what you call... Then turn the Restorer Classic theme and then replace the button Manager session to the domain again.

  • [X 200] MUTE button and bluetooth does not not after installing Windows 8

    Recently did an upgrade on Windows 7 site to 8.1 and have pretty much everything works except the button mute and Manager connections (and thus bluetooth). I tried to install the latest driver button support page for Windows 8 X 200, and while I saw him appear in Device Manager after you restart, it made no difference. Also, the noise stopped working during this time. I uninstalled driver buttons and brings the sound back, but I still want to get buttons will still once (and the connection manager).

    Any ideas?

    Thank you.

    After much experimentation, I solved the problem. The problem is caused by the integration function Hotkey not installing pack is not right. The most recent version on the assistance of the X 200 (version 3.89.0100) page is over (at least for Windows 8). When you try to install it, it will not yet to present the possibility of installing the highest importance "pilot interface system. To resolve this problem, there are a few things. First of all, I uninstalled what I call the "ThinkPad features Trio"-this is the Hotkey integration pack, power management driver and the driver of tablet buttons.

    After uninstalling and rebooting the computer, we can start fresh. To get things working properly, I installed the old Hotkey integration Pack (version 3.52, us.driverscollection.com, look for links to download fake of course), rebooted, installed the driver of power, restarted and finally installed the previous version of the Tablet driver management buttons I used with Windows 7 before, followed by a final reboot.

    This combination gets all the buttons (mute, Fn + F5, the buttons of the tablet) and features OSD works 100%. The only negative side effect is that Windows 8 has its own bar of volume on the screen when you change the volume with the buttons, so you will see both the bar and the Lenovo one native. It seems a bit funny, but they overlap or anything like that, so I'm fine with it.

  • My printer prints everything too small and landscape. It also doesn't let me choose Properties?

    I try to print on my printer and everything is too small and landscape. It doesn't let me go to properties when I'm ready to print?

    Hi KEVIN KATEMC * DONOUGH,.

    Thanks for posting in the Microsoft Community.

    I understand that you are facing the question with the printer prints everything too small and landscape and not able to choose Properties.

    What is the brand and model of the printer?

    Did you change to the computer?

    This problem only occurs with this application?

    I suggest you to follow the steps and check.

    1. click on printer properties by clicking on the printer and select Properties.

    2. go in the general tab, and then to the bottom of the window, select Printing Preferences.

    3. in the next window remove the button called advance.

    4. in the eyes of graphics for scaling article. If you do not set to 100%, that might be your problem. Change to 100%, and test.

    I also suggest you to see the links and check.

    Resources for the resolution of the printer in Windows XP problems

    http://support.Microsoft.com/kb/308028

    You experience problems when you view the printer properties in Windows XP or Windows Server 2003

    http://support.Microsoft.com/kb/922975

    See also:

    Printer in Windows problems

    http://Windows.Microsoft.com/en-us/Windows/help/printer-problems-in-Windows

  • I need activate vista windows aero but disable them deleted on my computer and Desktop Manager on my own :(

    I need activate vista windows aero them but them deleted on my computer and Desktop Manager disable on mine :(

    Please see the following article with a Mr. fixit and other solutions for a missing aero theme:http://support.microsoft.com/kb/945000.

    This is an art. that addresses both the disabled and disabled aero Desktop Manager problem and a possible solution:http://support.microsoft.com/kb/934561.

    Here is another article on troubleshooting problems with Aero and Desktop Manager:http://www.mydigitallife.info/2006/12/17/get-and-enable-windows-vista-aero-glass-transparency-effect-and-desktop-windows-manager-dwm/.

    I hope this helps.

    Good luck!

    Lorien - MCSA/MCSE/network + / has + - if this post solves your problem, please click the 'Mark as answer' or 'Useful' button at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • Windows 7 will not be printed with the photo viewer and Picture Manager.

    Everytime I open an image file with Windows or Office Picture Manager Photo Viewer and try to print, I get 4 message boxes that said "your photos cannot be printed because this error occurred.

    There is nothing else that a button OK - not even one error code.

    The strange this is I can print almost anything with any other program very well. Firefox, Photoshop, all those print without problem. It's only the viewer Photo and Picture Manager that do this.

    The printer is an Epson RX595 with 64-bit drivers.

    My Office Picture Manager calls a dialog box that has a dropbox to define the printer. If you create an image of a document (*.mdi) you know it's the printer driver that has a problem.

    Messages rating helps other users

    Mark L. Ferguson MS - MVP

  • Buttons HP Pavilion DV3 Volume, Mute button and button Wireless does not.

    My HP volume buttons not working do not. Reinstall Manager quick launch buttons, but still does not.

    Any idea.

    Hello

    Please perform a hard reset:
    1 disconnect all devices and remove all USB devices and multimedia cards.
    2 disconnect the power adapter, remove the battery and then press in and hold the button for at least 1 minute.
    3 reconnect the power adapter (do not connect the battery), press the power button and check the results.

  • Problem with display 2 buttons and 2 labels

    Hello

    I was able to display 2 buttons. Now, I am trying to display 2 buttons and 2 labels. This code indicates that a single button and a labe.

    Javax.swing import. *;

    import java.awt.*. *;

    java.awt.event import. *;

    SerializableAttribute public class Intro2 extends JFrame {}

    private int count = 0;

    private int count2 = 0;

    Private JButton myButton = new JButton ("Push Me1!");

    Private JLabel label = new JLabel ("Count:" + count);

    Private JButton myButton2 = new JButton ("Push Me2!");

    Private JLabel label2 = new JLabel ("Count:" + count);

    public Intro2() {}

    setDefaultCloseOperation (EXIT_ON_CLOSE);

    setLayout (new FlowLayout()); Set layout manager

    getContentPane () .add (mybutton); Add components

    getContentPane () .add (label);

    getContentPane () .add (mybutton2);

    getContentPane () .add (label2);

    * MyButton.addActionListener (new ActionListener() {}

    public void actionPerformed (ActionEvent e) {}

    Count ++;

    label.setText ("Count:" + count);

    }

    });

    myButton2.addActionListener (new ActionListener() {}

    public void actionPerformed (ActionEvent e) {}

    count2 ++;

    Label2.SetText ("Count2:" + count2);

    }

    });*/

    Pack();

    setVisible (true);

    }

    Public Shared Sub main (String [] args) {}

    try {}

    UIManager.setLookAndFeel (UIManager.getSystemLookAndFeelClassName ());

    } catch (Exception exc) {}

    new Intro();

    }

    }

    Some body please guide me.

    Zulfi.

    Works fine for me. In other words, once I corrected the syntax error in the last line. It says "new Intro", but the class is called "Intro2.

  • I just installed Lightroom CC 2015 and when it opens after 5 or 10 seconds video flashes up "" look at an overview of Lightroom and its features". It is not possible to cancel or return to Lightroom. I can just click on the play button and after that, Lig

    I just installed Lightroom CC 2015 and when it opens after 5 or 10 seconds video flashes up "" look at an overview of Lightroom and its features". It is not possible to cancel or return to Lightroom. I can just click on the play button and after that, Lightroom crashes.

    I uninstalled Lightroom, re-installed, but everything remains the same. After clicking on the play button, the video window is black. I can only kill Lightroom in the Task Manager.

    I use Windows 7.

    Thank you for helping me.

    OK guys, I have a solution. Press escape [ESC] to close the video window. Yes I know... It took less than hour of my time to understand this. If Adobe please, no matter how lucky you could focus on the provision of a useful product, not to invent unnecessary mess that have zero impact on your username? And Holy shit, employ a specialist UX, this is catastrophic!

  • I have a creative cloud account and stupidly click the upgrade button and began a "trial period" of Photoshop that I already own. Well, the "trial period" failed and I don't have a version of Photoshop to use even if I'm still topical. How to make

    I have a creative cloud account and stupidly click the upgrade button and began a "trial period" of Photoshop that I already own. Well, the "trial period" failed and I don't have a version of Photoshop to use even if I'm still topical. How to get back to my "old" version of Photoshop?

    Are you sure that you are using to connect, use the steps in the correct Adobe id: https://helpx.adobe.com/manage-account-membership/cc-reverts-to-trial.html

    Let us know if that helps.

  • Security roles and workflow management groups

    People,

    There is a section on Workflow management groups and security roles in vCloud Request Manager Installation and Configuration Guide - Guide of Directors Chapter 5 and 6. I have difficulty working on the relationship between the two settings.

    My first question is around the goal of the WM default checkbox that the specific guide is used to set the default user workflow management group.

    What would a never used default WM? I mean, what would he ever substitute the other workflow management groups that you define.

    In addition, in the guide, it say cloud Blueprint Admin and Asset Manager security role is a combination of the Admin of Blueprint of cloud and the Asset Manager. Is cloud Blueprint Admin & Asset Manager being the two groups of workflow management, reasonable to assume that a security role is composed of workflow management groups?

    And when I select agent, I do not see a cloud Blueprint Admin and Asset Manager security role listed?

    Finally, is there a way to determine the exact permissions that contains a workflow management group/security role?

    Thank you

    Cormac

    The Group Management (WM) default workflow is largely an artifact of vSM based vRM.

    VSM, a group of WM is a collection of agents used to apply security and route of tasks, among other responsibilities. (For the purpose of vRM, an agent can defined as users who have access to the vRM admin interface).

    vRM mainly use WM groups as a way to deliver relevant communications to users based on their responsibilities for example vCD Admins, Asset Managers etc. vRM does not require other functions related to WM groups.

    For functional reasons, vSM requires that each officer with access to the capabilities of WM belong at least a WM group. In addition, at least one of these groups must be designated the default WM for this officer group. These functional reasons are not immediately relevant to the specific use of vRM rest however case the constraint. Suffice to say for vRM, every WM user must have a WM group by default even if this information must never be used.

    Roles and groups are separate entities. A role defines a set of privileges to access a particular functional area of the admin interface for example a role WM sets permissions to interact with the workflow. of the roles of management (CM) configuration sets permissions to review and modify records in the repository of vRM.

    A special role of WM can be associated with one or more groups WM. When this WM role is assigned to a user, that user inherits groups associated with this role, WM allowing to simplify the administration of groups. An individual user can also have other WM assigned groups to them directly, complementary to those inherited from their role of WM.

    At an abstract level, vRM defines three types of users of the admin interface:

    1 vCD Admins

    2. plan Admins

    3. managers

    However, the security of MSM model requires that each individual user must be implemented with several components. By default, vRM sets a "Asset Managers" WM Group of what assets all managers must belong. However, WM groups cannot be used to give access to the features as well, so a separate from the "Asset Managers" WM role is obliged to grant access to these features asset managers. By default, the role of "Asset Manager" WM is associated with the "Asset Managers" group such that any user who is assigned the role automatically belongs to the Group also. There is also a separate 'Asset Managers' CM role that gives asset managers they need to the repository vRM for example the possibility to add new licenses for software products.

    This model of definitions is repeated for 3 personas above with a group and several roles defined for each. When an administrator assigns a user to one of these characters they should assign the groups and roles appropriate according to the documentation. They should not need to be concerned by the distinctions between each component.

    The role of the "Plan Director Admin and Asset Manager" reflects that a user may need to be asset manager and a Director of Blueprint. Because a user can have a role to the maximum by functional area, vRM provides a compound that provides two sets of permissions. However, a user can belong to several groups WM, so it is never necessary to provide a composite group.

    The role of composite is there; just maybe not where you expect to find. Blueprint Admins do not need to access WM, so there is not a 'Blueprint' Admin or a composite WM role. Blueprint Admins do need access to configuration management so it's an "Admin blueprint" and a role of CM composite.

    The details of the user screen provides:

    • a summary of all groups to which a user belongs

    • provides a 'Détails' button to drill down on each role assigned to the user to inspect the permissions granted by this particular role

    You must be a vCD Admin to see areas of the screen.

  • Problems with the list of the button and drop-down list

    Hello

    I want my users to view revenue by country or city...

    to select country I use a "list of the button' and for the city I'm on a 'combo '... When my select user a country, the cities of filtered accordingly... everything works fine, except the following (it is in step 3):

    Step 1. When I select a country (let's say canada) report gives me an appropriate set of data...
    Step 2. When I filter in a city (let's say Toronto) everyting works very well according to the filter...
    Step 3. When I select another country (let's say the USA), I get no data displayed on my report but good news, it's that my drop down the city will update accordingly
    Step 4. to get the required data, I have to change city (let's say Chicago)...


    what I want is that when my user select another country (step 3)... then the report should display data for all cities and I used the logical

    Select rev table_country
    where
    (b.City =
    CASE
    When: P49_CITY = 'ALL' THEN b.City
    OTHERWISE: P49_CITY END)

    somehow, I want the P49_CITY to 'ALL' value when the user selects a country

    Please advice

    Hello

    This is the way of simply to do.

    1 make the country select list (P49_COUNTRY) a select list with submit
    2. create a conditional branch that dates back to the 49 Page
    3 do the conditional branch of type PL/SQL Expression. In the expression 1 enter

    :REQUEST = 'P49_COUNTRY';
    

    4. in the value of these items , enter P49_CITY and let these values in white.

    So when the country is changed the page will be submitted, take over the management of the status of the page and in the process put the city at null.

    Kind regards

  • Cannot restart or refresh my iPhone 7 from the "home" button and the sleep/wake button at the same time

    I'm having difficulty trying to restart and update my iPhone 7 using the Home button and the sleep/wake button at the same time, when I do my phone takes a screenshot of the home screen.

    Should I turn off my Touch ID?

    Basically my home button button and / standby works not together at the same time.

    You need hold the House and turn off the button for 20 seconds, until the Apple logo appears.

  • My portfolio is currently configured to allow access when locked. I used to be able to double-click the home button and seems my card and I would enter my access code. I have updated to IOS 10 and I am no longer able to do this.

    My portfolio is currently configured to allow access when locked. I used to be able to double-click the home button and seems my card and I would enter my access code. I have updated to IOS 10 and I am no longer able to do this. All the settings are there. I have an IPhone 6.

    Are? you double click in front of the screen of the iPhone are? (pending). This is what seems to work for me.

    I hope this can help.

Maybe you are looking for