Split the screen vertically

Hello

I have a question to split the screen of a BlackBerry. I use BlackBerry JDE 4.5.

I want to split my screen into two vertical parts. Then I want to have each side a RichTextField (later with different font size).

In addition, I use a colorful pattern. I try the following code, but it does not work. I have read that 'left '. Why?

//for background color
super(MainScreen.NO_HORIZONTAL_SCROLL | MainScreen.NO_VERTICAL_SCROLL | MainScreen.NO_VERTICAL_SCROLLBAR);
        _contenu = new VerticalFieldManager(Manager.USE_ALL_WIDTH | Manager.VERTICAL_SCROLL | Manager.VERTICAL_SCROLLBAR);
        _screen = new VerticalFieldManager(Manager.USE_ALL_HEIGHT | Manager.USE_ALL_WIDTH) {
        public void paintBackground(final Graphics graphics) {
        super.paintBackground(graphics);
        //graphics.setColor(0x00FFDF18);
        graphics.setColor(0x00E0FFFF);
        graphics.fillRect(0, 0, getWidth(), getHeight() + 10000);
        graphics.setColor(0x00000000);
        }
        };
        _screen.add(_contenu);

    _hfmLeft = new HorizontalFieldManager(HorizontalFieldManager.HORIZONTAL_SCROLL | HorizontalFieldManager.HORIZONTAL_SCROLLBAR | HorizontalFieldManager.USE_ALL_HEIGHT)
    {
            protected void sublayout(int maxWidth, int maxHeight)
            {
                super.sublayout(maxWidth, maxHeight);
                setExtent(maxWidth/2, maxHeight);
            }
    };

    _hfmRight = new HorizontalFieldManager(HorizontalFieldManager.HORIZONTAL_SCROLL | HorizontalFieldManager.HORIZONTAL_SCROLLBAR | HorizontalFieldManager.USE_ALL_HEIGHT)
    {
            protected void sublayout(int maxWidth, int maxHeight)
            {
                super.sublayout(maxWidth, maxHeight);
                setExtent(maxWidth, maxHeight);
                //setPosition(100, 10);
            }
    };

    rtField = new RichTextField("Left");
    _hfmLeft.add(rtField);
    _screen.add(_hfmLeft);
    rtField2 = new RichTextField("Right");
    _hfmRight.add(rtField2);
    _screen.add(_hfmRight);
    add(_screen);

Thank you!

Do _screen a HorizontalFieldManager and get rid of _contenu. It works perfectly.

Rab

Tags: BlackBerry Developers

Similar Questions

  • How to split the screen vertically?

    I want to split in the part left and right screen. The left is used to display text with RichTextField and the right side is for a button. The code is as follows:

    final RichTextField text  = new RichTextField("Hello World! To create menu items in your own application, extend this abstract class. Your subclasses must implement the Runnable  interface, which in turn supports abstract dispatching of menu actions on activation. For example.", Field.NON_FOCUSABLE);
    
    final ButtonField next = new ButtonField("Press me", ButtonField.CONSUME_CLICK);
    
    HorizontalFieldManager hrMgr = new HorizontalFieldManager();
    
    VerticalFieldManager vfMgr1 = new VerticalFieldManager(){
    
        public int getPreferredWidth() {      System.out.println("next.getWidth() = " + next.getWidth());       System.out.println("Display.getWidth() = " + Display.getWidth());     return Display.getWidth() - next.getWidth()-20;   }
    
       protected void sublayout(int maxWidth, int maxHeight) {       System.out.println("getPreferredWidth() = " + getPreferredWidth());
    
          super.sublayout(getPreferredWidth(), text.getPreferredHeight());      setExtent(getPreferredWidth(), text.getPreferredHeight());    }
    
    };vfMgr1.add(text); 
    
    VerticalFieldManager vfMgr2 = new VerticalFieldManager();vfMgr2.add(next);
    
    hrMgr.add(vfMgr1);hrMgr.add(vfMgr2);
    
    add(hrMgr);
    

    But there are 2 problems:

    1. the button cannot be displayed fully. It shrink and the text disappear.

    2. only of first line of text can be displayed and others disappear.

    Is there a way to automatically calculate the width of the buttons and height of RichTextField.

    Thank you very much!

    Replace your vfMgr1 as Manager below:

            VerticalFieldManager vfMgr1 = new VerticalFieldManager()
            {
                protected void sublayout(int width, int height)
                {
                    int w = Display.getWidth() - next.getPreferredWidth()-20;
                    Field field;
                    int fieldCount;
                    int x = 0;
                    int y = 0;
    
                    fieldCount = getFieldCount();
                    for(int i = 0; i < fieldCount; i++)
                    {
                        field = getField(i);
                        setPositionChild(field, x, y);
                        layoutChild(field, w, height);
                        y += field.getContentHeight();
                    }
                    setExtent(w, y);
                }
            };
    

    Concerning

    Bika

  • How we split the screen for different horizontal and vertical divisions

    Hello

    How we split the screen for different horizontal and vertical divisions. I can't use panelSplitter because I need fixed screen and not the division which is movable/sliding. I tried inlineframe, but which fails because you cannot use forms, other trees components... :(

    so I would like to know how to do division without panelSplitter.

    Thanks in advance,
    Jyothi

    Hi Jyothi,

    If you set the panelSplitter attribute disabled to true, the delimiter becomes permanent/mobile no.

    
    

    Kind regards
    Amélie Chan

  • How to split the screen with 2 or more apps

    How do I split the screen when I have 2 or more open applications?

    Here are the instructions for use, two Mac apps side by side in split - view Apple Support

  • How to split the screen of my mac book

    How to split the screen of my Macbook?

    There may be a solution on how to split the screen into two (halves) for independent display

    through the use of third-party software options. I haven't tried everything, but have read of some who can work.

    Such a "solution party' appears in the Mac App Store; See the second link to the manufacturer.

    https://iTunes.Apple.com/us/app/split-screen/id453757310?MT=12

    • Split screen - Mac app for windows (approximately $7 USD) display management

    http://www.splitscreenapp.com/

    There may be others, beware of questionable sources, as they may contain others? content.

    This may work on a Mac, not a portable desktop computer:

    • Apple introduced mode split for the apps full screen on a Mac in OS X El Capitan - 9to5Mac.com:

    http://9to5Mac.com/2015/06/08/Mac-split-screen-multitasking/

    In any case...

    Good luck & happy computing!

    under the direction

  • Microsoft Word gets stuck when it try to split the screen

    whenever I have try to split the screen safari and Microsoft word, he always gets stuck trying to do and I always have to force quit it how can I fix?

    Not all applications are supported in split mode.

    The above comes from there:

    Use both Mac applications side by side in split view - Apple Support

  • How to split the screen to see the 2 different tabs side by side

    How to open an instance of FF and open 2 tabs visible side by side.
    Or is this not possible and I must have two instances of open FF size screens for half the screen?

  • iMac late 2009, squares spread on the screen, vertical lines of color

    Hi, while working on the imac 2009 end got suddenly squares scattered all over the screen and froze, rely on the button in the back to restart. After reboot when starting, I got colored vertical lines at the same time with the logo of apple and after the screen whent white, and that's it nothing else, remains just white. Appreciate any input.

    Sounds like your graphics card has failed. Find a CENTER in your area and make it check and get an estimate to determine if it is cost effective to repair.

    https://locate.Apple.com/

  • When I move the slider on the right he split the screen and I can't get rid of

    the screen splits and I have to restart

    This is not a default option in Firefox. You will have an add-on such as Fox Splitter or Split Pannel. If you don't want this feature, you can uninstall the add-in, for details, see disable or remove modules.

  • Split the screen does not display app.

    When I use the split screen, it does not show I want to access the app. I tried using the app and then go to the screen with another application on the main part of the split screen. Does not work. Can anyone help?  Use iPad Pro with the latest versions of all software.

    Not EVERY application has support for split screen. You may be just trying to use the one that simply will not allow split screen until it is updated.

    If you say to use others 'test' to see if they can get to use Split Screen.

  • How to split the screen on 2 monitors?

    I have 2 screens (monitors) and to split the info on the main screen so that I / 2 if poster on the 1 screen and the other half appears on the other screen. How is that done?

    Keep it keys on your keyboard and type P until the desired option is selected (probably the option to extend my display ).

  • Hero image to fit the screen vertically?

    I recently created a Web site with a navigation bar on the top of the home screen. Just below the navigation bar, I placed a hero image that spans the entire width of the page. I want to make this image extends all along the visible page by the person accessing the page. This means when they visit the site, they will see only the bar of navigation and the image of hero. Then when they start to scroll down, more of the page will be revealed. I found a great example of this at www.orangedigital.com.au

    Any help will be much appreciated.

    You can either use an image in the browser or the filling of the page or you can stretch the image vertically so that users get the option of scrolling the page on the image.

    Thank you

    Sanjit

  • How to rotate the screen vertically

    original title: rotated screen

    Help!  I pushed my remote keyboard while watchng TV and the screen has rotated to the right and there is no sound.  Can you tell me how to fix it please?

    Press Ctrl & Alt keys and use the arrows to rotate back.

    According to the graphics card on your computer, these can be alternatives.

    Right click on the desktop | Graphics options | Rotation.

    Right click on the desktop | Screen resolution | Orientation.

  • How can I view 2 sites at the same time (using the ms ms ctrl button to split the screen)

    I can't open a second secession of ff if I can use the split screen feature offered by windows. I want to see 2 things at the same time I cannot compare etc.

    Try this: https://addons.mozilla.org/en-US/firefox/addon/fox-splitter/?src=ss

    Alternatively, open a second window of Firefox (Firefox button > new tab > new window or Ctrl + N), the second loading site, resize the windows side by side.

    If this answer solved your problem, please click 'Solved It' next to this response when connected to the forum.

    Not related to your question, but...

    You may need to update some plug-ins. Check your plug-ins and update if necessary:

  • WinXP split the screen problem

    Brand: Compaq Presario
    Model: V6444US
    OS: XP sp3

    Problem:

    When the computer is turned on this morning the entire screen (from the beginning of initialization) was split into tiled copies of iteslf. Even when I go into the BIOS screen, it is too divided in copies in mosaic. When Windows starts, the entire desktop is tiled. Each tile has its own cursor, taskbar, desktop icons and programs. All the tiles to work at the same time (not individually), so when the mouse moves, all cursors are moving the same direction and click on the same icon in each tile. When a program is open, it opens all the tiles. No new programs have been installed and no updates since the last use (the day before).

    Attempted fixes:

    1. simple restart - no change
    2 system restore - no change
    3. updated - graphic driver is not necessary
    4 anti-virus - clean

    Someone at - it clues on how I can remove the split and make normal again (apart from complete reinstallation)? Any help is appreciated thank you.

    Hello Khahli,

    Thank you for your message.  We will try to update the driver manually.  Please follow the steps below:
    Click 'Start' > right click on 'My computer' > select 'manage '.
    Click on Device Manager.
    Click the (+) sign next to "display adapters".
    Below, you should see the info of your video card, right click on the video card and select "Properties".
    Select the "Driver" tab > click on "Uninstall".
    This will remove your driver.  Restart and reinstall your driver that you have disk or downloaded from the Web of HP/Compaq website.
    Please let us know if it did or did not help to solve your problem.
    See you soon

    Engineer Jason Microsoft Support answers visit our Microsoft answers feedback Forum and let us know what you think.

Maybe you are looking for

  • Game stops after installing directx 9

    Hi, I downloaded directx 9 Microsoft Download last night.  Now my sniper game stops in the middle of the room.  I tried restoring the system & I can't restore to an earlier time.  How can I fix it?  How can I get rid of directx 9?  I am running Vista

  • Upgrade Vista Basic Vista Home Premium with the old product key.

    When I bought my laptop, it came with Vista Home Premium installed. I had to wipe my HD and reinstalled Vista using the diskette provided me by Dell, but the version they gave me was Vista Home Basic. Is there a way to upgrade to Home Premium with pa

  • Limit of Cisco ACS 4.2 Max Auth/authentication devices.

    Hi guys. Can someone tell me how many devices can an ACS works with GANYMEDE 4.2 +?. Is there a limit? and if there is, who he is and whence Cisco publishes. Has spent a whole morning and without success, reaching for the info. Ty in advance. Carlos.

  • How do I know what version of DW is my Web site?

    I closed my business and was not the person who edited my site, my employees did. I need to update my site to say that I am closed. I don't have the computer which was the old version of DW on it more and I don't know how to determine which version o

  • PowerCLI - export to CSV

    Hello worldI'm trying to run a command powercli and export the results to a csv file. I run the command below, but when I opened the whole output CSV file is added in column 1 of Excel, but there are 4 columns of data. Is there a way I can get it in