Problem in the scrolling list box

Hello

In my application, I need a list field that contains ten records. The screen is similar to below:

To do this, I wrote the code. But after adding a few lines in the list field, the entire screen goes up. My code is:

m_vfmScreen = new VerticalFieldManager(Manager.VERTICAL_SCROLL) {
            int nHight;
            int hight = 0;
            int width = 0;

            protected void sublayout(int nMaxWidth, int nMaxHeight) {
                int orientation = Display.getOrientation();
                width = Display.getWidth();

if (orientation == Display.DIRECTION_PORTRAIT)
                {
                    hight = BOTTOMBAR_BITMAP.getHeight() * 2;
                }
                else
                {
                    hight = 0;
                }

                super.sublayout(nMaxWidth, nMaxHeight);
                Field field;
                field = getField(0);
                setPositionChild(field, 10, 10);
                layoutChild(field, field.getWidth(), field.getHeight());

                field = getField(1);
                setPositionChild(field, 10, 50);
                layoutChild(field, Display.getWidth() - 20, nMaxHeight - 10);

                Logger.out("MyTransaction", "Inside sublayout method and before setpositionchild method in the vfmscreen-----");

                setExtent(nMaxWidth, nMaxHeight);
            }

    protected void paint(Graphics g)
            {

                int hight2 = Display.getHeight() - hight;

                if (hight == 0)
                {
                    int n = this.getFieldCount();
                    hight2 = this.getField(n - 1).getTop() + this.getField(n - 1).getHeight();
                }
                Logger.out("WelcomeScreen", "Paint method widht :" + width + " nhight2 :" + hight2 + " hight :" + hight);
                g.setColor(0x949CAD);
                g.fillRect(0, 0, width, hight2);
                g.setColor(Color.WHITE);
                g.fillRoundRect(10, 10, width - 20, hight2 - 20, 10, 10);
                g.setColor(Color.BLACK);
                super.paint(g);
            }
        };

/**
         * creating HorizontalFieldManager object to place the labels properly
         * when Orientation changed.
         *
         */
        HorizontalFieldManager hfmHeading = new HorizontalFieldManager(Manager.NO_HORIZONTAL_SCROLL) {

            protected void sublayout(int nMaxWidth, int nMaxHeight) {
                if (Display.getOrientation() == Display.DIRECTION_PORTRAIT) {
                    m_bmpHeader = Bitmap.getBitmapResource("my_transactions_heading.png");
                    Logger.out("MYTransactionScreen", "inside sublayout mehtod;;;;;;;;;");

                } else if (Display.getOrientation() == Display.DIRECTION_LANDSCAPE) {
                    m_bmpHeader = Bitmap.getBitmapResource("ls_my_transactions_heading.png");
                }
                super.sublayout(nMaxWidth, nMaxHeight);
                setExtent(getPreferredWidth(), getPreferredHeight());
                Logger.out("MyTransaction", "after setExtent()-----");
            }

            public int getPreferredWidth() {
                return (Display.getWidth() - 20);
            }

            public int getPreferredHeight() {
                return m_bmpHeader.getHeight();
            }

            protected void paint(Graphics g) {
                g.drawBitmap(0, 0, (Display.getWidth() - 20), m_bmpHeader.getHeight(), m_bmpHeader, 0, 0);
                super.paint(g);
            }
        };

        hfmHeading.setMargin(new XYEdges(0, 0, 0, 10));
        /**
         * Date Field
         */
        LabelFieldCustom m_lfcDateField = new LabelFieldCustom("Date", Color.GRAY, NON_FOCUSABLE);
        m_lfcDateField.setMargin(new XYEdges(5, 0, 0, 55));
        hfmHeading.add(m_lfcDateField);

        /**
         * Detail Field
         */
        LabelFieldCustom m_lfcDetailField = new LabelFieldCustom("Details", Color.GRAY, NON_FOCUSABLE);
        m_lfcDetailField.setMargin(new XYEdges(5, 0, 0, 65));
        hfmHeading.add(m_lfcDetailField);

        /**
         * ListField Object creation
         */
        TaskListField listField = new TaskListField(tran);

        /**
         * VerticalField Manager for the list
         */
        VerticalFieldManager vfmList = new VerticalFieldManager(Manager.VERTICAL_SCROLL);
        vfmList.add(listField);

 

Here the field of task list is the class that adds lines in the field in the list and it works fine. But when I add the field in the list on the screen to create the problem. I use jre 5.0 and 9550 Simulator. Please help me and if you doubt ask me.

Peter sorry for your inconvenience. However, I correct this problem. So thank you for your advice. I'll take care of him in the future.

Tags: BlackBerry Developers

Similar Questions

  • I checked the updates, but the updates list box would stop now.

    * Original Title: Windows Update

    I am running windows 7 64 bit sp1. I formatted my computer yesterday morning after installation of windows and office, I checked for updates, and the updates list box would stop now. He ran for 24 hours until 11:00 and still the same, to research. Everything is enabled for the update services and. Any help?

    Just did this yesterday and today...

    Windows Update does not work

    This is a very common problem lately.  The tool the more importantly you need right now is a lot of patience.  Resources Windows Microsoft Update are prioritize the updates of Windows 7 to a very low service level and have been since the beginning of summer 2015.  It is not uncommon that the update of Windows to take one night.

    In many cases, the following rather simple and fast process works.

    http://answers.Microsoft.com/en-us/Windows/Forum/windows8_1-update/Windows-Update-problem-error-code-80080008/de8114b5-1487-4B31-9b28-f11974718df1?auth=1  This thread has essentially lists a series of commands that I found generally fixed WU.

    Start, all programs, accessories, right-click on command prompt, select run as administrator, OK.  Type the following in the black box:

    1. net stop wuauserv
    2. net stop cryptSvc
    3. net stop bits
    4. net stop msiserver
    5. Ren SoftwareDistribution.old C:\Windows\SoftwareDistribution
    6. Ren C:\Windows\System32\catroot2 catroot2.old
    7. net start wuauserv
    8. net start cryptSvc
    9. net start bits
    10. net start msiserver
    11. pause
    12. Output

    Services of type in the text box above the start planet.  Find each of the following items and make sure they are set to automatic: Intelligent Transfer in the background, cryptographic, Windows Installer, Windows Update services.  Double-click on each item and choose automatic.

    If you still have a problem, try this.  It will take a long time, but in almost all gets case Windows Update back on the right track.

    1. Download and run the appropriate version for your system KB947821 update readiness tool system.  https://support.Microsoft.com/en-CA/KB/947821 32-bit systems X 86.  X 64 64-bit systems.  This is likely to take some time (may be several hours) because it makes all kinds of resets.
    2. Download KB3102810 directly from the Microsoft web site and install it.  https://support.Microsoft.com/en-us/KB/3102810

    Now restart Windows Update.  Do NOT restart Windows.   Be very, very sick, it will probably take a while.

  • Box selection drop-down list in the multicolumn list box.

    Hi friends,

    Is it possible to insert the drop-down list box in the multicolumn list box.

    You can see this kind of GUI in "multiple variables Editor.

    I have attached screenshot of this screen.

    "picture explains more then thousand words.

    Thank you.

    And here's one: http://forums.ni.com/t5/LabVIEW/Add-a-Drop-down-menu-Combo-Box-into-a-specified-cell-of-a-multi/m-p/...

    You can also take a look at this code in LAVA: http://lavag.org/files/file/31-type-sensitive-popup/

  • problem in the scroll bar, please help...

    I have a problem with the scroll bar, why my horizontal scroll bar did not work on my labelfield?

    It works when I change the labelfield in a buttonfield.

    is there a different code for labelfield scrollbar?

    Please help me...

    This is my simple code...

    You have to edit it like this...

    Source language:

    a = new LabelField ("tessssst1");

    change:

    a = new LabelField ("tessssst1", FOCUSABLE);

    in the same way for all the fields in the label...

  • Problem in the scroll bars when the screen is not any field focus...

    Hi all

    I have a screen on which I need to display a list of items. and the list total appears at the bottom of the list. everything works fine if the lily a few number of lines. but as soon as the number of rows and Lily exceeds the length of the screen, there is the problem. I don't see the total at the bottom because I can't scroll the list. Here is the code in my class. in the class list, I use a CustomGridManager, which shows data in a table (I downloaded it). I made a few changes in the present. the code for this handler is also attached. Please tell me what changes should I make, so that the screen can be the object of a scroll. (Please go through the code)...

    SerializableAttribute public class MyClass extends {screen

    public MyClass (dataList DataList []) {}

    Super(Manager.VERTICAL_SCROLLBAR |) Manager.VERTICAL_SCROLL);

    Super();

    int noOfColumns = 2;

    int noOfRows = dataList.length;

    int [] columnWidth = {50.50};

    CustomGridManager gfmHeader = new CustomGridManager (noOfColumns, 0, columnWidth);

    Adding headers

    LabelField lblHdrCol1 = new LabelField ("Col1");

    gfmHeader.add (lblHdrCol1);

    LabelField lblHdrCol2 = new LabelField ("Col2");

    gfmHeader.add (lblHdrCol2);

    VerticalFieldManager vfmTitle = new VerticalFieldManager();

    vfmTitle.add (new LabelField ("my class"));

    vfmTitle.add (gfmHeader);

    setTitle (vfmTitle);

    Addition of body

    GFM CustomGridManager = new CustomGridManager (noOfColumns, 0, columnWidth);

    for (int i = 0; i)< noofrows;="">

    LabelField lblICol1 = new LabelField (dataList [i] .getCol1 ());

    GFM. Add (lblICol1);

    LabelField lblICol2 = new LabelField (dataList [i] .getCol2 ());

    GFM. Add (lblICol2);

    Adding a footer

    CustomGridManager gfmFooter = new CustomGridManager (noOfColumns, 0, columnWidth);

    LabelField lblFtrTotal = new LabelField ("Total");

    gfmFooter.add (lblFtrTotal);

    LabelField lblFtrValue = new LabelField ("CalculatedValue");

    gfmFooter.add (lblFtrValue);

    Add (gfmHeader);

    Add (new SeparatorField());

    Add (GFM);

    Add (new SeparatorField());

    Add (gfmFooter);

    Add (new SeparatorField());

    }

    ======================================================

    SerializableAttribute public class CustomGridManager extends Manager {}

    private int [] columnWidths;

    private int [] staticColumnWidth;

    private int columns;

    private int allRowHeight = - 1;

    /**

    * Built a new CustomGridManager with the number of columns specified.

    * Lines will be added to the need to display the fields.

    * Fields will be added to the grid in the order they are added to this Manager.

    to complete each row from left to right:

    *

    * For example, a Manager 2 column:

    *

    * [Field1] [Field2]

    * [Field3] [Field4]

    * [Sphere5]

    *

    * Column widths are equal, and the Manager will attempt to use the entire available width.

    Each line height will be equal to the height of the field higher in the same row.

    * Styles positional field are met, then the fields that are smaller than the row/column

    * they can be set to left, right, up down, or centered. They have by default at the top left.

    *

    @param columns number of columns in the grid

    @param style

    */

    public GridFieldManager (columns int, long style) {}

    Super(Manager.VERTICAL_SCROLLBAR |) Manager.VERTICAL_SCROLL);

    Super (style);

    This.colonnes = columns;

    }

    /**

    *

    @param columns columns number of columns in the grid

    @param style

    @param columnWidths width of each column in a table

    */

    public GridFieldManager (columns int, long style, int [] columnWidths) {}

    Super(Manager.VERTICAL_SCROLLBAR |) Manager.VERTICAL_SCROLL);

    Super (style);

    This.colonnes = columns;

    this.staticColumnWidth = columnWidths;

    }

    protected boolean navigationMovement (int dx, int dy, int, int time status) {}

    int focusIndex = getFieldWithFocusIndex();

    While (dy > 0) {}

    focusIndex += columns;

    {If (focusIndex > = {getFieldCount())}

    Returns false; The focus moves on this manager

    }

    else {}

    Field f = getField (focusIndex);

    If (f.isFocusable ()) {/ / only move the focus on the fields of the object of focus}

    f.setFocus ();

    -DY;

    }

    }

    }

    While (dy< 0)="">

    focusIndex = columns;

    If (focusIndex< 0)="">

    Returns false;

    }

    else {}

    Field f = getField (focusIndex);

    If (f.isFocusable ()) {}

    f.setFocus ();

    DY ++;

    }

    }

    }

    While (dx > 0) {}

    focusIndex ++;

    {If (focusIndex > = {getFieldCount())}

    Returns false;

    }

    else {}

    Field f = getField (focusIndex);

    If (f.isFocusable ()) {}

    f.setFocus ();

    -DX;

    }

    }

    }

    While (dx< 0)="">

    -focusIndex;

    If (focusIndex< 0)="">

    Returns false;

    }

    else {}

    Field f = getField (focusIndex);

    If (f.isFocusable ()) {}

    f.setFocus ();

    DX ++;

    }

    }

    }

    Returns true;

    }

    protected void sublayout (int width, int height) {}

    int y = 0;

    columnWidths = new int [columns];

    If (staticColumnWidth == null: staticColumnWidth.length)<= 0)="">

    for (int i = 0; i)< columns;="" i++)="">

    columnWidths [i] = width/columns;

    }

    } else {}

    for (int i = 0; i)< columns;="" i++)="">

    columnWidths [i] = (width * staticColumnWidth [i]) / 100;

    }

    }

    On the field [] fields = Field [new columnWidths.length];

    currentColumn int = 0;

    rowHeight = 0 int;

    for (int i = 0; i)< getfieldcount();="" i++)="">

    fields [currentColumn] = getField (i);

    layoutChild (fields [currentColumn], columnWidths [currentColumn], height-y);

    If (fields [currentColumn] .getHeight () > rowHeight) {}

    rowHeight = fields [currentColumn] .getHeight ();

    }

    currentColumn ++;

    {If (currentColumn == columnWidths.length | I == {getFieldCount () - 1)}

    int x = 0;

    If (this.allRowHeight > = 0) {}

    rowHeight = this.allRowHeight;

    }

    for (int c = 0; c)< currentcolumn;="" c++)="">

    long fieldStyle is fields [c] .getStyle ();.

    int fieldXOffset = 0;

    long fieldHalign = fieldStyle & Field.FIELD_HALIGN_MASK;

    If (fieldHalign == Field.FIELD_RIGHT) {}

    fieldXOffset = columnWidths [c] - fields [c] .getWidth ();

    }

    Else if (fieldHalign == Field.FIELD_HCENTER) {}

    fieldXOffset = (columnWidths [c] - fields [c] .getWidth ()) / 2;

    }

    int fieldYOffset = 0;

    long fieldValign = fieldStyle & Field.FIELD_VALIGN_MASK;

    If (fieldValign == Field.FIELD_BOTTOM) {}

    fieldYOffset = rowHeight - fields [c] .getHeight ();

    }

    Else if (fieldValign == Field.FIELD_VCENTER) {}

    fieldYOffset = (rowHeight-fields [c] .getHeight ()) / 2;

    }

    setPositionChild (fields [c], x + fieldXOffset, y + fieldYOffset);

    x += columnWidths [c];

    }

    currentColumn = 0;

    y += rowHeight.

    }

    If (y > = height) {}

    break;

    }

    }

    totalWidth int = 0;

    for (int i = 0; i)< columnwidths.length;="" i++)="">

    totalWidth += columnWidths [i];

    }

    setExtent (totalWidth, Math.min (y, height));

    }

    }

    Do you really want now fields is active.

    You can try adding a NullField after your Manager - a NullField is active, if it does not size.

    Other than that, you can try the substitution of navigationMovement and Manager.setVerticalScroll to go up and down the window scrolling.  I think it should work, although I never did.  You can control the scope of the first Manager to ensure that you do not have to scroll through to the end.

  • Problem with the scroll bar doesn't work is not on the computer.

    I've recently updated to Windows 8, and now the scroll bar on the right side of my touchpad is not scrolling.  I have an Acer computer.  Can someone help me solve this problem?

    You may be able to get this feature back by getting Windows 8 drivers for your touchpad.

    Go to the Acer website and search your computer model and see if there are drivers of Windows 8.

    See if there is a touchpad drivers listed for your computer.

    Click to download, select run and follow the instructions that the Installer gives.

    I hope you find the driver you need.

    You can see other drivers for your computer too while you're there. The drivers from the manufacturer works usually better than Windows comes with that.

  • Problem of Index of List Box

    I am running 8.2 and I'm having a problem, returning the index value of the selected items in a list box on my form in the designer.

    I have a list box that is populated by the webservice and everything works well.  I am able to view s name (s) selected for the items selected in the list box, but I can't seem to get the index value.  Here's my Javascript code.

    var a = xfa.resolveNode("lbAccountGroup.value").nodes;

    xfa.host.messageBox (a.item (0) .value); Selection of the screen for verification.

    Does anyone have any advice on how to do that?  I tried selectedIndex and index instead of the value, and nothing has worked.

    Thank you in advance.

    John

    What event your code runs on... I would recommend the exit event. I would use ListBox1.selectIndex. Note that the index is 0-based and it is undefined until the output (by default). There is a small check box (in the object palette where you set the values) which allows you to set whether you want the validation to occur. You can change to select if you need that the user makes changes to the list box. I would not use the technique that you use when you query the DOM.

    Paul

  • One of the two list boxes other work returns null.

    To the right,.

    I work with an earlier program not created by myself and I have a strange behavior in a list box.  There are two areas of list with the proper functioning and the other indicates a null value in the data.  When you look at the front panel, you will see two boxes on the right side.  One marked 'file for L1 Test' one 'File for L2 Test' is not working.  Even if the path in the filenames in the L2 box fail in the program and when you explore the test line, you get a "" to the probe.  No idea why one works and the other does not?

    Gary Tyrna

    It certainly seems that the control has somehow been corrupted.  Copy work on the non-working and updated the element names and it should start working.

  • Cannot change the properties of online text in the scrolling text box

    I have a simple text box with a UIScrollBar component added to it.

    Text box properties are on "enter text, multi line.

    The problem is when I want to change a single line of text to a "BOLD" or a different color, changing the content of the entire text box. I tried the setting of the different property for the text box itself with no luck.

    Is this possible? I have to use AS3?

    I would really appreciate help!

    Thank you!!!

    Steve

    If you change the html true property - either by using the property inspector or code if you are working with code - then you should be able to have different styles in a text box. This is the property that you tried and it didn't work so I need to learn more about how you try to apply the formatting.

    In cases concerning need it AS3... In general, I would say that if you do not have an overwhelming need to AS2 so you should use AS3. It has nothing to do with the text of no!

  • Deleting items in the populated list box

    I have a drop down list fill a list box. (change: ListBox1.addItem (xfa.event.newText)) But I can add more then one of the same selection, so how to do that I remove them to the ListBox control. On click? somehow? I don't know the jargon.

    There's a selectedIndex property, which will again give the index of the element 1 is selected.

    Paul

  • Problem with the folder list

    Hello

    I try to use the folder list to the list of all the files in the folder of LVM. However, I get this error message when I run the VI.

    I tried to key in the pattern such as *.lvm or even using the loop, still do this out of the error message. Please help me.

    See you soon

    PX

    Hi PX.

    I guess you must enter a folder instead of a path of the file LVM.

    Hope this helps,

    Mavis

  • Quiz Questions installed within the scrolling text box?

    Hello

    Is quick question, possible to enter the quiz questions in a text scrolling Interaction?  Thanks for your time.

    -Brett H.

    I don't think it's possible, because the scrolling text is an Interaction, and you have almost no control over it. Certainly not the questions by default, which is totally excluded.

  • Problem with the selection list dynamic LOV using bind variables

    I have the following SQL to fill a selection list:

    Select d, ch from
    (
    Select ft. FAMT_NAME d, pi. R FAM_ID_T of FAMILY_TRA ft
    Join the ck list
    on ck.family = ft.famt_name and ck.newseq in (: NEWSEQ_QUERY_SQL)
    )

    Where NEWSEQ_QUERY_SQL is a part of the application that is defined by a calculation of page and essentially returns a list of values NEWSEQ based on some parameters of the user query. For example:

    Select distinct (ck.newseq) in the ck list where rownum < 20

    The query above works fine with SQL Developer and returns two columns needed (display_value, return_value)

    However, it returns no line, when it is used to fill the LOV to a selection list.

    If I replace the: NEWSEQ_QUERY_SQL with a list of NEWSEQ hard-coded, it works:

    Select d, ch from to)
    Select ft. FAMT_NAME d, pi. FAM_ID_T r
    of FAMILY_TRA ft join checklist ck on (ck.family = ft.famt_name and ck.newseq in ('K0242900', 'K0217200'))
    ) ;

    I can even replace: NEWSEQ_QUERY_SQL with hard-coded SQL and it works:

    Select d, ch from
    (
    Select ft. FAMT_NAME d, pi. R FAM_ID_T of FAMILY_TRA ft
    Join the ck list
    on (ck.family = ft.famt_name and ck.newseq in (select ck.newseq from the list ck where rownum < 20))
    )

    But if there is a connection variable (: NEWSEQ_QUERY_SQL), it doesn't.

    Selection lists are driving me crazy! They seem incredibly capricious.

    Hello:

    You cannot link a "sql statement" that bind the value you're trying to do.
    P2_FAMILY_LIST must be the SQL statement you executed for the LOV. Something like

    select d, r from
    (
    select ft.FAMT_NAME d, ft.FAM_ID_T r from FAMILY_TRA ft
    join checklist ck
    on (ck.family = ft.famt_name and ck.newseq in (select ck.newseq from checklist ck where rownum < 20))
    )
    

    CITY

  • small problem with the printer dialog box

    I recently added a Brother printer to my IMac and ran into a minor problem.  When I put in place using my WiFi and AirPrint, the dialog box has a convenient box for the black and white that I was able to check in one easy-to-replace step and just print in color.  However, the alarm time and the answer is a bit slow.  So, I then plugged a cable and add this version of the printer.  Now the box is missing and nothing I've been able to do, to delete and add new printer allowed me to bring that?  Any ideas on how I can get this feature practice appears in the dialog box with the printer connected to the cable?  Thank you.

    If I understand correctly, you have now two entries separated for this printer to Print & Scan? It's OK, although AirPrint is better for various reasons.

    I understand the printer takes an unacceptable amount of time to wake up to when choosing the AirPrint printer, and you want to avoid this.

    If you have added a separate entrance - one for the USB printer connected - how who you? Did you leave the print & Scan install this printer automatically on its own, or did you download and install a driver of brother separately?

  • Problem with the file dialog box

    Hello erveryone,.

    My problem is quite easy... I try to use the file of dialogue vi of NOR and its work properly, but when I select a file using the double click, the second click is detected as a click on my Panel of...

    Example, if the file I select in the local file dialog box is justa button on my Panel (under the pop - up), the action for this button is run...

    I tried to disable my front panel when you use the dialog box, but it doesn't change anything.

    Someone there had the same problem? Anyone find a solution to this problem?

    Thanks for the help,

    Fabrice

    Hmm... What's not here? When the file in the dialog selected with double-click, and then disappeared with the mouse down, so dialogue, your dialogue control receives the mouse upward:

    Double click: mouse-> mouse-> mouse downwards upwards downwards (here missing dialogue)-> the mouse upwards (you got it). Nothing wrong. Can be inconvenient in some cases.

    Andrey.

Maybe you are looking for

  • mirroring AirPlay look for apple tv

    Since the iOS 10 update on iPhone and iPad, it seems that I can't find my AirPort Express for streaming music on my stereo.  When I click on AirPlay Mirroring it only looks for AppleTV and never find my Express.  Someone else has a similar problem? 

  • Downgrade of Tecra A8 - Bussiness from Vista to XP Profesional

    Hello I have a laptop Tecra A8-104 which came with Vista Business. I want to downgrade to XP Professional. Can you help me with this? I don't know where to find a legal XP free kit for installation. Toshiba provides a Kit of XP for the downgrade? Aft

  • Re: No sound on my Satellite A100-496

    My laptop is a Toshiba A100-496 The audio controller is a Realtek High Definition Audio. Initially did his, but no more. Have updated to the latest version of the drivers from the Toshiba Web site but still no sound! Looked in Device Manager and it s

  • When I download service pack 3, it is not optional.

    I get a message that's me, "Unable to read or write to the database" tellin when I download service pack 3

  • My video card does support two screens

    HDMI to TV problem Hi there, hope I'm on the appropriate form. I use Win7 Ultimate with an extended descktop (2 x 19 "LCD) video card is a GeForce GTS 450. I record a lot of TV on my PC using the TV Tuner installed. I have connected the PC to the TV