ListField (s) nested in VerticalFieldManager-> SWIPE/SCROLL with HorizontalFieldManager

I have 2 ListField objects. Each within its own VerticalFieldManager object. 2 VFMs are inside a HorizontalFieldManager object. I am trying to allow the user to BLOW/scrolling of one ListField to another (LEFT/RIGHT). I did not have the TouchEvent portion this again (I guess I'll have to put in place something there).

Here's what I have so far... However, only the first ListField shows with data (random numbers right now). The other is empty. I also want to allow the user to select individual lines in each ListField

All the suggestions/help is appreciated.

See you soon,.

public final class MyScreen extends MainScreen {

    public MyScreen() {
        super(MyScreen.NO_VERTICAL_SCROLL);
        Random rand = new Random();
        HorizontalFieldManager hm = new HorizontalFieldManager(HorizontalFieldManager.HORIZONTAL_SCROLL);
        Vector v1 = new Vector();
        Vector v2 = new Vector();
        for (int i = 0; i < 10; i++) {
            v1.addElement(Integer.toString(rand.nextInt(200)));
            v2.addElement(Integer.toString(rand.nextInt(300)));
        }
        hm.add(new ListManager(v1, "VM lf1"));
        hm.add(new ListManager(v2, "VM lf2"));
        add(hm);

        // Set the displayed title of the screen
        setTitle("MyTitle");

    }

    class ListManager extends VerticalFieldManager {
        private Vector _elements;
        ListField _lf;

        ListManager(Vector elements, String title) {
            super(Manager.VERTICAL_SCROLL | Manager.VERTICAL_SCROLLBAR);
            _lf = new ListField();
            _lf.setCallback(new ListCallback());
            this._elements = elements;
            add(new RichTextField(title));
            add(_lf);
            updateList();
        }

        private class ListCallback implements ListFieldCallback {

            public void drawListRow(ListField list, Graphics g, int index, int y, int w) {
                g.setColor(Color.BLACK);
                String text = (String) _elements.elementAt(index);
                g.drawText(text, 5, y, 0, w);
            }

            public Object get(ListField list, int index) {
                return _elements.elementAt(index);
            }

            public int indexOfList(ListField list, String p, int s) {
                return _elements.indexOf(p, s);
            }

            public int getPreferredWidth(ListField list) {
                return Display.getWidth();
            }
        }

        protected void sublayout(int width, int height) {
            super.sublayout(width, height);

            setExtent(width, height);
        }

        private void updateList() {
            _lf.setSize(_elements.size());
        }

    }
}

The two lists show up... However, the halves just in the same HM. My goal is to have everyone take full screen (visible at the time) only... then the user has to SWIPE (from EAST to WEST) to see the list of the other.

So I changed the following line

super.sublayout(Display.getWidth(), height);

Thanks Peter

Tags: BlackBerry Developers

Similar Questions

  • Scroll with mouse wheel requires several "ticks" to start scrolling

    I recently got a new mouse, and now when you use firefox the scroll wheel doesn't work properly. Everywhere else, I can do simple ticks of scrolling to scroll the content, but in firefox a graduation scroll is simply ignored as are several ticks if a little slow. In order to get firefox to actually scroll with the mouse wheel, I quickly make a few ticks at the same time. This makes for very imprecise control.

    I tried to turn off smooth scrolling, hardware acceleration and pixel scrolling, but none of these permits. Any help for firefox to stop ignoring ticks of slow and unique scrolling would be greatly appreciated.

    Well, after some searching around, I found that reported on a different logitech mouse and it ends up being the setpoint for firefox extension. I turned that off and scroll began to work properly in firefox.

  • Using Firefox 30 0n win 7 system. When I'm on a web page and try to scroll right scroll with the arrow keys, the page jumps to the bottom of the page is chec

    The application databases

    Name: Firefox
    Version: 30.0
    User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; RV:30.0) Gecko/20100101 Firefox/30.0

    Reports of incidents for the last 3 days

    All Crash reports

    Extensions

    Name: McAfee Security Scan more
    Version: 1.0
    Enabled: false
    ID: {e4f94d1e-2f53-401e-8885-681602c0ddd8}

    Name: McAfee SiteAdvisor
    Version: 3.7.0
    Enabled: false
    ID: {4ED1F68A-5463-4931-9384-8FFF5ED91D92}

    Important change preferences

    Accessibility.browsewithcaret: true
    Browser.cache.Disk.Capacity: 358400
    Browser.cache.Disk.smart_size_cached_value: 358400
    Browser.cache.Disk.smart_size.first_run: false
    Browser.cache.Disk.smart_size.use_old_max: false
    browser.places.smartBookmarksVersion: 7
    browser.sessionstore.upgradeBackup.latestBuildID: 20140605174243
    Browser.Startup.homepage_override.buildid: 20140605174243
    Browser.Startup.homepage_override.mstone: 30.0
    dom.mozApps.used: true
    extensions.lastAppVersion: 30.0
    network.cookie.prefsMigrated: true
    places.database.lastMaintenance: 1404084666
    places. History.expiration.transient_current_max_pages: 100530
    plugin.disable_full_page_plugin_for_types: application/pdf
    plugin.importedState: true
    Print.printer_HP_Photosmart_6510_series.print_bgcolor: false
    Print.printer_HP_Photosmart_6510_series.print_bgimages: false
    Print.printer_HP_Photosmart_6510_series.print_colorspace:
    Print.printer_HP_Photosmart_6510_series.print_command:
    Print.printer_HP_Photosmart_6510_series.print_downloadfonts: false
    Print.printer_HP_Photosmart_6510_series.print_duplex: 1515870810
    Print.printer_HP_Photosmart_6510_series.print_edge_bottom: 0
    Print.printer_HP_Photosmart_6510_series.print_edge_left: 0
    Print.printer_HP_Photosmart_6510_series.print_edge_right: 0
    Print.printer_HP_Photosmart_6510_series.print_edge_top: 0
    Print.printer_HP_Photosmart_6510_series.print_evenpages: true
    Print.printer_HP_Photosmart_6510_series.print_footercenter:
    Print.printer_HP_Photosmart_6510_series.print_footerleft: & PT
    Print.printer_HP_Photosmart_6510_series.print_footerright: & D
    Print.printer_HP_Photosmart_6510_series.print_headercenter:
    Print.printer_HP_Photosmart_6510_series.print_headerleft: & T
    Print.printer_HP_Photosmart_6510_series.print_headerright: & U
    Print.printer_HP_Photosmart_6510_series.print_in_color: true
    Print.printer_HP_Photosmart_6510_series.print_margin_bottom: 0.5
    Print.printer_HP_Photosmart_6510_series.print_margin_left: 0.5
    Print.printer_HP_Photosmart_6510_series.print_margin_right: 0.5
    Print.printer_HP_Photosmart_6510_series.print_margin_top: 0.5
    Print.printer_HP_Photosmart_6510_series.print_oddpages: true
    Print.printer_HP_Photosmart_6510_series.print_orientation: 0
    Print.printer_HP_Photosmart_6510_series.print_page_delay: 50
    Print.printer_HP_Photosmart_6510_series.print_paper_data: 1
    Print.printer_HP_Photosmart_6510_series.print_paper_height: 11 h 00
    Print.printer_HP_Photosmart_6510_series.print_paper_name:
    Print.printer_HP_Photosmart_6510_series.print_paper_size_type: 0
    Print.printer_HP_Photosmart_6510_series.print_paper_size_unit: 0
    Print.printer_HP_Photosmart_6510_series.print_paper_width: 8.50
    Print.printer_HP_Photosmart_6510_series.print_plex_name:
    Print.printer_HP_Photosmart_6510_series.print_resolution: 1515870810
    Print.printer_HP_Photosmart_6510_series.print_resolution_name:
    Print.printer_HP_Photosmart_6510_series.print_reversed: false
    Print.printer_HP_Photosmart_6510_series.print_scaling: 1.00
    Print.printer_HP_Photosmart_6510_series.print_shrink_to_fit: true
    Print.printer_HP_Photosmart_6510_series.print_to_file: false
    Print.printer_HP_Photosmart_6510_series.print_unwriteable_margin_bottom: 0
    Print.printer_HP_Photosmart_6510_series.print_unwriteable_margin_left: 0
    Print.printer_HP_Photosmart_6510_series.print_unwriteable_margin_right: 0
    Print.printer_HP_Photosmart_6510_series.print_unwriteable_margin_top: 0
    privacy.sanitize.migrateFx3Prefs: true
    privacy.sanitize.timeSpan: 0
    Storage.vacuum.Last.index: 1
    Storage.vacuum.Last.places.sqlite: 1403633482

    Graphics

    Description of the adapter: ATI Mobility Radeon HD 4200 Series
    Drivers: atiu9p64 aticfx64 aticfx64 atiu9pag aticfx32 aticfx32 atiumd64 atidxx64 atidxx64 atiumdag atidxx32 atidxx32 atiumdva atiumd6a atitmm64
    RAM card: 256
    Device ID: 0 x 9712
    Direct2D Enabled: Blocked for your version of the graphics driver. Try to update your driver graphic version 10.6 or newer.
    DirectWrite Enabled: false (6.2.9200.16571)
    Driver date: 15/03/2010
    Driver version: 8.712.2.1000
    GPU #2 Active: false
    GPU accelerated Windows: Direct3D 9 1/1
    Vendor ID: 0 x 1002
    WebGL Renderer: Google Inc. - ANGLE (ATI Mobility Radeon HD 4200 Series Direct3D9Ex vs_3_0 ps_3_0)
    windowLayerManagerRemote: false
    AzureCanvasBackend: skiing
    AzureContentBackend: Cairo
    AzureFallbackCanvasBackend: Cairo
    AzureSkiaAccelerated: 0

    JavaScript

    Incremental GC: true

    Accessibility

    Enabled: false
    Prevent accessibility: 0

    Versions of the library

    NSPR
    The expected minimum version: 4.10.6
    Version: 4.10.6

    NSS
    The expected minimum version: 3.16 base ECC
    Version: 3.16 base ECC

    NSSSMIME
    The expected minimum version: 3.16 base ECC
    Version: 3.16 base ECC

    NSSSSL
    The expected minimum version: 3.16 base ECC
    Version: 3.16 base ECC

    NSSUTIL
    The expected minimum version: 3.16
    Version: 3.16

    This could be linked to the "keyboard navigation" function, which moves the cursor on the page when you scroll with the arrow. Or maybe in this case jumps around things on the page.

    You can enable the use:

    • F7 key
    • "3-bar" menu button (or tools) > Options > advanced > general mini-onglet > uncheck the box 'always use the buttons cursor to navigate through the pages.

    A little luck?

  • scrolling with keyboard problem

    When scrolling with down, he reached the end of the page

    You may have switched to the keyboard navigation.

    You can press F7 (Mac: fn + F7) to toggle the power switch keyboard navigation.

    • Tools > Options > advanced > general > accessibility: [] "always use the cursor keys to navigate through the pages."
  • Scrolling with the mouse on the pages to create black and white, lines

    When scrolling with the mouse, periodically the entire screen turns into black and white lines. Page sometimes together, sometimes just from ads pictures/side. If you continue to scroll disappear but you need to scroll to where the lines have begun, it's hard to explain, I took 1 picture of the problem but will have more photos that I can, I love how Firefox works on my computer, it has always been the best browser for my needs. I recently bought a new desktop computer, but he did so also, so I deleted and tried to launch the Explorer and Google and I don't like, so I hope that we can settle this problem.

    I don't know if it solved the problem, but he didn't precisely these days. Thank you

  • TouchPad does not scroll with Win 7 on Satellite A200 PSAE3E

    Hello

    I have a little problem with the touchpad after update my OS for Win7 (x 86 32-bit).
    Scrolling with the latest drivers for Win7 from Toshiba and Synaptics does not work well.

    14.0.3.0 driver version (2009-08-27) Toshiba A200 PSAE3E

    Does anyone have a solution?

    Best regards

    Hello

    > scroll with the latest drivers for Win7 from Toshiba and Synaptics does not work well.
    Is this means that the scroll function is available after the installation of Win 7?

    UM, to me, looks like you need configure the touchpad function.
    You can do this in Control Panel-> mouse-> device settings
    There should be an additional tab containing the options of touchpad

    Here, you could change and increase the contact surface is needed for scrolling and similar you could increase the sensitivity too

    Welcome them

  • Cannot scroll with the scroll on my mouse button in some Applications

    How do I can't scroll with the scroll on my mouse button in some applications? Happen for example when I tried to scroll my Lotus Notes e-mail messages. I was not able to scroll using the button on my mouse! Very annoying!

    Hi X04p2n! I had the same problem! I was not able to scroll with the scroll thing (dunno what it's called) in note either. Just, I went on the site and downloaded the correct drivers for my mouse and it works since.

  • How can I configure firefox to scroll with the arrows?

    I used to be able to scroll with the arrows, as if I was with my mouse wheel, but now when I push on up and down, firefox takes me immediately to the top or bottom of a page. How can I do so that it scrolls up and down slowly?

    Click on the orange button Firefox, go to Options | Options | Advanced. On the general tab, check "Use Smooth Scrolling".

    Also, either of these two Add-ons may help: https://addons.mozilla.org/en-US/firefox/addon/yet-another-smooth-scrolling/

    https://addons.Mozilla.org/en-us/Firefox/addon/SmoothWheel/

  • Satellite L750 - how scrolling with the touchpad?

    I have a Satellite L750 (my first laptop and first touchpad) running Windows 7. I put the mouse scrolling to 1 line at a time, but every time I place the pointer on the right scroll bar arrow down (and press the left button or press on) the screen pops so that the scroll bar is at the bottom. I want the screen to "inch" down slowly as if I was using a mouse wheel.

    Yes, I know that the answer is probably very simple, so those people who are itching to answer don't forget I'm a 'newbie' to touchpad.

    Concerning

    Hey,.

    You can scroll with the touchpad on the right side of it. Just move your finger upward or down on the right side of the touchpad and you can scroll with this gesture. It of not complicated and very easy.
    In addition, these basic operations are described in the user manual and I recommend reading. ;)

    If you are not familiar with the touch pad, you can also connect an external USB mouse (mouse even as on a desktop computer). These external mice are cheap and you don't need a driver for it. Just connect it to a USB port and it of ready to use :)

  • Scrolling with the mouse 5.1 BootCamp

    Scrolling with the mouse stopped working all of a sudden on BootCamp 5.1.

    Do you have any active Windows automatic updates?

  • HP15-ac189nia: how I can scroll with my pad on hp15-ac189nia

    Please hepl that im not able to scroll with my mousepad on my laptop.

    Thank you

    Hello

    Installs:

    http://ftp.HP.com/pub/SoftPaq/sp72501-73000/sp72664.exe

    Concerning

  • Pavillion DV6 1030US new SSHD: I can't scroll with my mouse pad. Keyboard is skip words

    I lost my original hard drive. I installed a new 500 GB SSHD in Pavillion DV6 1030US. I have received the help of the forum. I can't scroll with the original mouse pad and when I type I am jumping of lines and words.

    Do, I went to the HP site and download the proper drivers. Solved.

  • I have a Logitech M315 keyboard and bought a new mouse Logitech M325 compatible. I cannot now typing on the keyboard, but I can scroll with the mouse.

    I have a Logitech M315 keyboard and bought a new mouse Logitech M325 compatible. I cannot now typing on the keyboard, but I can scroll with the mouse.

    Hello

    The M325 Nano-receiver allows you to connect up to 6 devices however you
    need a Logitech utility (free download) to achieve this. Check with Logitech
    Their online documentation, support and drivers, utilities and ask in their forums.

    I don't know if that keyboard and mouse are compatible.

    Software Logitech Unifying M325
    http://support.Logitech.com/product/wireless-mouse-M325#download

    Logitech
    http://www.Logitech.com/en-us/home

    Logitech - Support
    http://www.Logitech.com/en-us/support

    Logitech - Forums
    http://forums.Logitech.com/

    I hope this helps.

    Rob Brown - Microsoft MVP<- profile="" -="" windows="" expert="" -="" consumer="" :="" bicycle="" -="" mark="" twain="" said="" it="">

  • block of scrolling with keyboard control panel

    Hello

    How can I scroll in the block with the keyboard Panel?

    When there is the need to go further, a block, or a diagram in the block Panel, it takes a long time to scroll with the mouse when an option is selected.

    Is it possible to use the keyboard to scroll when the mouse has selected something and she can use the scroll bars?

    Thank you.

    You can move the items selected using the arrow keys.

    If you hold the SHIFT key while moving them, they will move in the biggest jumps.

    In addition, if you hold the SHIFT key while scrolling the mouse wheel, it will move in the biggest jumps, but I don't know how it behaves when you have something selected.

  • Problem with setting "Horizontal scrolling with tilt wheel"

    All of a sudden, everytime I open a spreadsheet it acts as if I am pressing the arrow button to the right and the active cell moves to the right as quickly as possible.

    At the same time:
    1. my wireless Microsoft mouse leave with the scroll wheel.
    2. when I click a down arrow, the menu is displayed for a split second, then disappears.
    Any ideas what may have caused this?
    * original title - Excel-unstoppable to the right at the opening of automatic pagination

    1 only with Excel

    2 Microsoft 6000v2.0
    3. since Monday morning, when I opened a spreadsheet
    4. the system changes. I didn't touch anything.
    5. the keyboard is clear. It only happens in Excel.
    I managed to do stop by disabling "horizontal scrolling with tilt wheel" in the mouse properties. Absolutely, I know for a fact that nobody changed this setting, but it became somehow activated.

Maybe you are looking for

  • Freezing on several applications

    I get the spinning wheel of death every time I try to use Safari and save documents. This just started today.  I did the EtreCheck I saw on another thread recommended, and here are my results, just in case where it is useful. EtreCheck version: 2.9.1

  • MFP: MFP with fax to email/smb

    Looking to buy a Mono Laser multifunction with Fax E-mail/smb feature. Anyone know what models are available?

  • Help please with playlists

    Hello world I got a Sansa Fuze 8 GB a few weeks back, but I can't seem to recognize the playlists at all, not matter what program I use. First of all, I used Windows Media Player as the suggested help manual. I made a playlist and followed all the in

  • Malware removed, but my computer is slower than before.

    Very well. I had a few irritating problems with my computer for awhile, and after some research diligent on my part, I came to know that it was a malware problem. So after I downloaded the appropriate programs and cleaned my computer, everything was

  • OIM 11 g PS3 Logo personalization changes

    BrHi,Has anyone tried updating the IOM PS 3 logo? I does not seem that it works.I went through the instructions https://docs.oracle.com/cd/E52734_01/oim/OMDEV/uicust.htm#OMDEV3557 and it says in the expression builder, change the value by default to