VBox Scrollbar problem

Hello

I thought I got my problem fixed from a previous post, but when I started to add other items, I came across a problem. What I'm trying to accomplish is an accordion that dynamically generates child VBox components. My problem was that I needed a scroll bar to appear next to the accordion, but now my problem is that I need the scroll bar to apply specifically to the accordion. I have a button below the accordion that I will not be performed by the scroll bar. See the code below:

That's what publishes the code above:

screen1.jpg

As you can see in this picture the button appears at the bottom of the scroll bar. The following image shows the features that you want that I'm aiming for:

screen2.jpg

On this picture you can see I want the scroll bar to apply only for the accordion and not for the button. I tried messing around with the property verticalScrollPolicy on the VBox containing the accordion, but I can't seem to get this to work.

Any help would be greatly appreciated.

Thank you

Brian

Ah, Yes, that's a good point.  MinHeight = 0 is probably too small.

Try a simple case with just one or two Vboxes and accordion and the

button and less other than 100% percent.

You might be better off wrapping the accordion in its own container

In theory what container never has minHeight = 0 will push the scroll bars.

Tags: Flex

Similar Questions

  • AF:panelStretchLayout scrollbar problem

    Using Jdeveloper 12.2.1.0

    I jspx simple page with af:panelStretchLayout under af:form.

    AF:panelStretchLayout has content in top and Center the facet.

    a outputtext and Center facet upper facet has af:table.

    PanelStretchLayoutScrollBar.png

    Scroll bar appears on page [see annex screenshot].

    We plan to spend 11.1.1.7.0 a 12.2.1. Because this question, all pages in the adf do additional scroll bar appearing, and it is not easy to use

    Is there any property on af:panelStretchLayout in 12.2.1 to get rid of this?

    JSPX Page code is as below:

    --------------------------------------

    <? XML version = "1.0" encoding = "UTF - 8"? >

    " < = xmlns:jsp jsp:root ' http://Java.Sun.com/JSP/page "version ="2.1"xmlns:f =" " http://Java.Sun.com/JSF/core "

    ' xmlns:af = ' http://xmlns.Oracle.com/ADF/faces/rich "> "

    < jsp:directive.page contentType = text/html"; Charset = UTF - 8 "/ >

    < f: view >

    < af:document title = 'Test' id = 'd1' >

    < af:messages id = "m1" / >

    < af:form id = "f1" >

    < af:panelStretchLayout id = "PSL1" >

    < f: facet = 'Start' name / >

    < f: facet = 'end' name / >

    < f: facet = 'top' name >

    < af:outputFormatted value = "sample Text" id = "1" / >

    < / f: facet >

    < f: facet = 'bottom' name / >

    < f: facet name = "center" >

    < af:table value = "#{bindings." Var SuppliersVO1.collectionModel}"="row ".

    lines = ' #{bindings. " SuppliersVO1.rangeSize}.

    emptyText = "#{bindings." SuppliersVO1.viewable? "{'No data to display.': 'Access Denied.'}".

    rowBandingInterval = '0 '.

    selectedRowKeys = ' #{bindings. " SuppliersVO1.collectionModel.selectedRow}.

    selectionListener = "#{bindings." SuppliersVO1.collectionModel.makeCurrent}.

    "single' = rowSelection fetchSize =" #{bindings. " SuppliersVO1.rangeSize}"id ="t1">

    < af:column headerText = "#{bindings." SuppliersVO1.hints.SupplierName.label}"id ="c2">

    < af:outputText value = "#{rank." SupplierName}.

    shortDesc = "#{bindings." SuppliersVO1.hints.SupplierName.tooltip}.

    ID = "ot2" / >

    < / af:column >

    < / af:table >

    < / f: facet >

    < / af:panelStretchLayout >

    < / af:form >

    < / af:document >

    < / f: view >

    < / jsp:root >

    Hello

    Try to change the property dimentionFrom of the stretch of the Parent Panel or child provision and give it a try.

    Aman J

  • How to load a component of personalization?

    I created a custom component that I want to load dynamics.
    In the end, I want to send an instance of the component I want to load the file user.mxml.
    So, I do not need to create a new file (user) when I create a new component.
    I want to use the same file to the user, but with some different components.
    My code looks like this.

    -UserForm.mxml-
    "" < mx:VBox xmlns:mx = ' http://www.adobe.com/2006/mxml " width ="350"height ="100% ">
    < mx:Label width = "100%" id = "headlabel" fontSize = "20" textAlign = "left" / >
    < mx:Accordion width = '100 percent"height ="100% ">
    < mx:Canvas label = "Användare" width = "100%" height = "100%" >
    < mx:Form id = "userForm" > < / mx:Form >
    < / mx:Canvas >
    < mx:Canvas label = "Företag" width = "100%" height = "100%" > < / mx:Canvas >
    < / mx:Accordion >
    < / mx:VBox >

    -User.mxml-
    < mx:Script > <! [CDATA]
    public void init(url:String):void {}
    getURL += url;
    var tmp:UserForm = new UserForm();
    edit.addChild (tmp);
    }
    []] > < / mx:Script >

    < mx:VBox id = "├editer" width = "100%" height = "100%" >
    < mx:HBox >
    < mx:Button id = "Save" label = "Save" low = "10" right = "10" click = "saveRow ()" / >

    < / mx:HBox >
    < / mx:VBox >

    The problem is that I can't get the UserForm.

    How can I do?

    The problem is the height = "100%" in the UserForm.mxml. This value will not be honored when you create the component dynamically. You can try this:

    var tmp:UserForm = new UserForm();
    tmp.percentHeight = 100;
    edit.addChild (tmp);

    The other option is explicitly set height of the component:

    tmp. Height = edit.height; Since you want to 100%
    edit.addChild (tmp);

    It's a little quirk of the Flex Framework.

  • convert obj XML in text for a URLRequest argument

    Hello

    I'm new to Flex builder 2 and I'm stuck something that I know is very basic, but I'm still on a learning curve (I'm procedural php programmer, so I know OOP, but have not worked with him on a daily basis)

    I have an XML file that one of the nodes contains a link to the documentation for the aid and there are different types of help documentation.

    I have this Setup:

    < mx:VBox label = "Help information" >
    < mx:Label text = "STOP: {dgroomRequest.selectedItem.help.hphone}" fontSize = "12" / > "
    < mx:Label text = "Links to Docs" textAlign = "left" fontWeight = "bold" fontSize = "12" textDecoration = "underline" / >
    < mx:Repeater id = dataProvider = "{dgroomRequest.selectedItem.help.docs"helpdocsrepeater"}" >
    {< mx:LinkButton label="{helpdocsrepeater.currentItem.@type}" click = "navigateToURL (new"»
    URLRequest ({helpdocsrepeater.currentItem}), '_blank') "/ >"
    < / mx:Repeater >
    < / mx:VBox >

    The problem I have is the URLRequest to recognize the databinding, a link that points to the html code in the XML file. Everything else works, but this part.

    I thought the data binding was an obj, so I thought using toString() or by wrapping it with String() to convert, but it doesn't seem to work.

    I appreciate any help or pointers.

    Thank you
    Hoyt

    Hey leeng,.
    Sorry for the delay, had a rough week. But here's a quick example of dirty that I stoked for you. Even if you use different components, it must still show you what to do. That's how I'd do:

    My test xml is:


    http://www.Amazon.com/books
    second test of the label


    http://www.Adobe.com
    second test of the label

    And my little fast app is:

    http://www.Adobe.com/2006/mxml"layout ="absolute"creationComplete =" init () ">"

    Import mx.controls.Alert;
    Import mx.rpc.events.FaultEvent;
    Import mx.rpc.events.ResultEvent;
    import flash.net.URLRequest;

    private var request: URLRequest = new URLRequest();
    [Bindable]
    private var xml = new XML();

    private function init (): void {}
    service. Send();
    }
    private void doClick(event:Event):void {}
    trace (Event.currentTarget.getRepeaterItem (). (Link);
    site of the var: String = event.currentTarget.getRepeaterItem () .link;
    Request.URL = site;
    navigateToURL (request, "_blank");
    }
    private void resultHandler(event:ResultEvent):void {}
    XML = XML (event.result);
    trace (XML);
    }
    private void faultHandler(event:FaultEvent):void {}
    Alert.Show (event.fault.message);
    }
    ]]>

    <>
    ID = 'service '.
    URL = "test. XML ".
    resultFormat = "e4x".
    result = "resultHandler (Event); »
    Fault = "FaultHandler (Event); "/ >







    I'll try and send you a zip of it, so you can see it working, just check the trace. Let me know if this helped you or need to explain more.

  • Problem with window painted and scrollbars when editing (LabVIEW 8.0.1)

    I'm under LabVIEW 8.0.1 in Windows XP SP3.  For my main VI, I came across a strange problem about 5 months ago.  The front window - both in edit mode and run mode - arrested repaint itself on the right side which is no longer visible when you scroll from top to bottom, but also visible overlapping Windows.  Coinciding with the repaint problem, both bars scroll search disabled grey arrows and no boxes in the bars that you can click and drag to scroll the window.  The scroll bars work still partially if you pass the mouse over it and roll the mouse wheel but does not work by clicking and dragging.

    The façade has a lot of controls and indicators, including containers of tab control and is greater in the horizontal directions and vertical so the two scroll bars must be active.  But I deleted everything in the Panel before and everything in the schema and the problem persists.  If the problem is not directly related to a control/led display.

    I saved the simple VI to this problem (using a line of large text and a high box rounded to test), and then created a new VI and copied the two elements at the new VI.  This new VI didn't paint it and the problem of the scroll bar.  The two screws are slightly different in the memory usage and the revision number (bad is review 1785 and the good is revision 3), but otherwise the two screws are identical.  I have attached two screws at this announcement.  When you first open the bad VI, you will see the scroll bars disabled while the good VI has active scroll bars.  To replicate the repaint problem, scroll the window up and down with your mouse wheel.  If it's good when you first open the VI, click on another window, then click on the window of VI and try again the mouse wheel.  This by clicking sur-loin-and-return always causes the problem of repaint for me.  I tried the screw on two different computers, both running Windows XP SP3 and LabVIEW 8.0.1 with identical results.

    Here's what I discovered simple troubleshooting with the screws:

    always off scroll bars

    * repaint the problem in the main window for larger then 680 pixels of window widths

    * repaint the problem in the menu bar of the main window for widths of more than 646 pixels

    * entire window becomes disabled than 1348 pixels window width

    * can paint window minimize and restore, but only repaints only once

    * scrollbar boxes sometimes flicker in the display, but then disappear

    * Scroll left and right hovering mouse over the bar and horizontal scroll by using the mouse wheel

    I found something similar on this forum (thread: problem with refresh of façade)-it could be linked to the CAR on the Panel being offset internally.  I don't have access to LabVIEW 8.5 or later and do not plan to upgrade - I have not tried the trial version, as this user has done.  I could try to copy and paste my set of the block for a new VI diagram but the VI is so important I'm afraid something would break, plus I don't want to do it again in a few months.  The problem seemed to occur after a certain number of stops (or revision number).  I save copies of backup often and when the problem first happened, I was able to go to a previous version, make the missing changes and save it without any problem, but this only delayed the problem and he came later.  It is therefore perhaps the revision number.  It seems not related to a change or a particular addition in the front panel and the graph.

    The attached picture shows the repaint problems and scroll bar in bad VI.

    This raises a question I have - if this problem is a bug has been fixed in 8.5 and later, is it possible to apply bug fixes for older versions?  Or what I need to pay for an update fix these bugs?

    Seems that something got corrupted with this VI. Things to copy on a cool VI and things should be OK.

    See also this recent report of a similar problem.

  • It's 2010 - we have solved the problem "centered layout vs scrollbars" yet?

    An unfortunate side effect of browser scrollbars being regarded as 'in-line' - in other words, the window is reduced when a scroll bar appears - is only centered layouts 'jump' a few pixels to the left when a page requires a vertical scroll bar.

    Googling the subject have given solutions that all centered around from overflowing the body of 1px height (by adding a margin 1px bottom) to force the presence of a scroll bar at any time.

    Now, this is not such a disaster of a solution if at least the scroll bar is grayed out. Such, the solution of 1px margin actually creates a live real scroll bar that scrolls... 1px. Leaving the Web Designer to watch as he has not done his math correctly.

    This, to me, is an unacceptable solution. So I was wondering if there are other more creative out there.

    HTML {overflow - y: scroll ;}

    This CSS will solve your problems by forcing pages to have a gutter of a scroll bar (if it is a scroll bar).

  • Layout problem: text in VBox with percentHeight

    I'm using Flex 3. I have a lot of problems with a text component inside a VBox component with percentHeight to put value. The behavior that I'm trying to get, it's the VBox will be a scroll bar that will allow the text to display. The behavior I get, it's that resizes it VBox on the entire height of the text element and does not take into account its percentHeight. I would use a text box instead of a text nested in a VBox, but I need to put other components inside the VBox so I want the VBox to be able to scroll through all of the items inside.

    Here is a sample application showing my problem:

    <? XML version = "1.0"? >
    " < = xmlns:mx mx:Application ' http://www.Adobe.com/2006/MXML "layout ="vertical"> "
    < mx:VBox width = "100%" height = "10%" borderStyle = "solid" backgroundColor = "white" >
    < mx:Text width = "100%" >
    < mx:text >
    <! [CDATA [Lorem ipsum dolor sit amet, adipiscing elit computer. In eleifend mi ultrices.
    NEC commodo eros ornare non. Vestibule dapibus placerat magna vel imperdiet. Nullam vel libero eget
    metus auctor tempus. Curabitur orci, fermentum odio eleifend eget faucibus pulvinar in. Pellentesque
    capita morbi tristique senectus and netus and renowned malesuada ac turpis egestas. Morbi porta
    Nunc fitness a ultrices. Aliquam ultricies interdum ullamcorper libero vel eros. Nam nibh felis,
    adipiscing ut fitness a, hendrerit eget enim. Suspendisse eleifend nibh EU. Curabitur metus erat,
    Semper at ultrices ac, mattis at nulla.
    []] >
    < / mx:text >
    < / mx:Text >
    < / mx:VBox >
    < / mx:Application >

    When resizing the browser horizontally, the VBox changes depending on its width, but when resizing vertically, the VBox remains always at the height of its contents and ignores the ' height = '10% ' "."

    Can anyone suggest a way to get the behavior that I'm trying to achieve?

    Just wrap a cloth around the VBox:

    skider wrote:

    I'm using Flex 3. I have a lot of problems with a text component inside a VBox component with percentHeight to put value. The behavior that I'm trying to get, it's the VBox will be a scroll bar that will allow the text to display. The behavior I get, it's that resizes it VBox on the entire height of the text element and does not take into account its percentHeight. I would use a text box instead of a text nested in a VBox, but I need to put other components inside the VBox so I want the VBox to be able to scroll through all of the items inside.

    Here is a sample application showing my problem:


    http://www.Adobe.com/2006/mxml"layout ="vertical">
      


           
               
                    NEC commodo eros ornare non. Vestibule dapibus placerat magna vel imperdiet. Nullam vel libero eget
    metus auctor tempus. Curabitur orci, fermentum odio eleifend eget faucibus pulvinar in. Pellentesque
    capita morbi tristique senectus and netus and renowned malesuada ac turpis egestas. Morbi porta
    Nunc fitness a ultrices. Aliquam ultricies interdum ullamcorper libero vel eros. Nam nibh felis,
    adipiscing ut fitness a, hendrerit eget enim. Suspendisse eleifend nibh EU. Curabitur metus erat,
    Semper at ultrices ac, mattis at nulla.
    ]]>
               

           

       


    When resizing the browser horizontally, the VBox changes depending on its width, but when resizing vertically, the VBox remains always at the height of its contents and ignores the ' height = '10% ' "."

    Can anyone suggest a way to get the behavior that I'm trying to achieve?

  • VBox inside ModuleLoader scrolling problem (w / screenshot of show)

    I have a VBox that scroll when even if the project runs as an Application, it works perfectly. I have then to modify the Application of a Module and load it into a parent using ModuleLoader app. As soon as I did that, the scrolling no longer works correctly. See screenshot

    http://www.jetScreenshot.com/demo/20090428-375-225kb.jpg

    I've also included this issue a bug introduced here:

    http://bugs.Adobe.com/jira/browse/SDK-16394

    Anyone ran into something like that with ModuleLoader? The controls are nested like this (if it is of any help):

    Main application

    ViewStack

    Box of

    Group of experts

    ModuleLoader

    Module

    VBox

    ViewStack

    VBox <-it's the Vbox with scrolling problems

    HBoxes children

    It almost seems that these events in the loaded Module are blend with the rest of the application. I have tried several things to rememdy this.

    Any ideas or suggestions would be very appreciated.

    No idea why full screen would help me.  You say that the module is loaded after you go fullscreen?  Otherwise, go to full screen can cause an update which is not the case in normal mode.  Or maybe something about the arrangement grows on a minimum size when you are not in full screen.

    Alex Harui

    Flex SDK Developer

    Adobe Systems Inc..

    Blog: http://blogs.adobe.com/aharui

  • Problem to reset VBox vertlcalScrollBar.scrollPosition

    Hey all,.

    I'm losing my hair with a problem I have with a scroll bar.

    Here are my components


    < mx:HBox id = "mainContainer".
    verticalScrollPolicy = "off" horizontalScrollPolicy = "off".
    paddingLeft = "170" paddingTop = "207" width = "100%" height = "100%".
    horizontalAlign = "left" verticalAlign = "top" >

    < mx:VBox name = value "mainContent" id = "mainContent" styleName = "listBackground".
    Width = "100%" height = "100%" verticalGap = "10".
    verticalScrollPolicy = "off" horizontalScrollPolicy = "off" >

    < mx:HBox width = "740" height = "26" verticalAlign = "top" >
    < mx:Text id = "ListTitle" text = "{title}".
    Width = "100%" styleName = "listTitle" selectable = "false" color = "red" / >
    < mx:Button id = "closeBtn" styleName = "closeButton" label = "Close" buttonMode = "true".
    height = "21" click = "onCloseClick (event)" / >
    < / mx:HBox >

    < mx:VBox id = "listContainer' width ="740"height ="314"verticalScrollBarStyleName ="ListScrollBar. "
    verticalScrollPolicy = "on" horizontalScrollPolicy = "off" verticalGap = "2".
    styleName = "postText" / >

    < / mx:VBox >
    < / mx:HBox >

    listContainer is updated each time the user back to the page and I would like to reset the scrollbarposition to 0, but it seems that it does not work.

    I did some trace to check what is happening

    If {(listContainer.verticalScrollBar)
    trace ("listContainer.verticalScrollBar" + listContainer.verticalScrollBar.scrollPosition);                     listContainer.verticalScrollBar.scrollPosition = listContainer.verticalScrollBar.minScrollPosition;
    trace ("listContainer.verticalScrollBar" + listContainer.verticalScrollBar.scrollPosition);
    }

    and I get this:

    listContainer.verticalScrollBar 168
    listContainer.verticalScrollBar 0

    discount

    listContainer.verticalScrollBar 168
    listContainer.verticalScrollBar 0

    Weird

    Hope someone can help me

    See you soon

    Sonia

    If you try to manipulate the bar using listContainer.verticalScrollBar.scrollPosition try instead to use the listContainer.verticalScrollPosition.

    If this does not work this maybe is a synchronization problem in the event stream and you can post your code that performs the changes bar

    Small example which is not useful.  Also if it's a timing issue you may be able to use the method callLater to delay the movement of the bar of your event processing has not been completed

    <>

    xmlns:MX ="

    http://www.adobe.com/2006/mxml"layout ="vertical ".

    width ="

    100% "height ="100% "backgroundColor ="#eaf1f6

    "

    backgroundGradientAlphas ="

    1.0,1.0">

    private function resetBarPos():void {}

    listContainer.verticalScrollPosition = 0;

    }

    ]]>

    height ="

    21"click =" resetBarPos () ""

    />

    verticalScrollPolicy ="

    on"horizontalScrollPolicy ="off"verticalGap ="2 ".

    styleName ="

    postText">

  • Problem of access to an object in a VBox

    Hello!

    I have a problem with access to an object that is in a VBox.
    I made an example so you can see my problem. I'm trying to access pnlChat.
    If you load the swf file you will not see the alert because there is something wrong (and I don't know what)
    If you try to delete the < mx:VBox > tags that surround the pnlChat Panel, it will not work.

    Why can't I access the object when it's in a VBox?

    Thank you

    'Jimmy Jeeves' wrote in message
    News:g8jv84$5ib$1@forums. Macromedia.com...
    > Hi!
    >
    > I have a problem with access to an object that is in a VBox.
    > I made an example so you can see my problem. I am trying to access
    > pnlChat.
    > If you load the swf file you will not see the alert because there is something
    > evil
    > (and I don't know what)
    > If you try to remove the tags that surround the pnlChat Panel, it
    > will be
    > work.
    >
    > Why can't access this object when it's in a VBox?

    In the FAQ I am compiling:

    Q: I need to set a property or add a listener for events on a component
    It's in a ViewStack/TabNavigator/accordion. When the component is not
    the first child of the browser container, I get null object error
    (#1009). What causes this and how can I solve this problem?
    R: by default, the Navigator container create only the children of
    each component this component is seen. The easy way to fix this is to set the
    creationPolicy for the browser to 'all '. However, this will cause your
    request to take more time to load. A better way to solve this problem is to wait
    a future event, like creationComplete on the component that you want to access,
    or use the link to 'pull' data in the component.
    The way I handle it is to call invalidateProperties() on the evolution of the
    ViewStack. I then override commitProperties() and claim an initializer of «»
    each pane. In the body of each initializer function, I check to see if the
    selectedItem to the viewStack is one that cares about my initalizer. If
    No, I just got back from the function immediately. This initializer inside
    function, I set properties and add listeners as appropriate.

  • VBox in accordion scrollbar issue

    I have an accordion with VBoxes children, and then a child of VBox at 100% and width in those VBoxes. Whenever content extends the current height of the VBox, I expect a vertical scroll bar appears on the right end of the child of VBox/accordion, but rather the scroll bar is displayed in the Middle vertically. How can I get the scroll bar to display properly, on the right edge? My installation of accordion code is attached.

    The VBox with the fact that I had the problem was not his height and width value of 100%. This solved the problem setting.

  • spectrum x 360: ScrollBar and Touchpad heat problems

    Hi everyone, I just got my x 380 13-4110dx spectrum model. After months of research on laptops, I settled on the spectrum, and it had shipped all the way from the United States to Bangladesh here. Needless to say that the questions arises as soon as I turned on the thing, so that's:

    TOUCHPAD:
    This is the big one. I'm used to having the page move down with my fingers while two fingers to scroll, but the direction of travel is reversed by default with coasting trade licence. However, when it is turned off reverse the scrolling and cabotage in the settings of synaptics it seems to work on some applications and not anothers. I tried to reset the onboard computer and reinstall the driver software AND I also tried to install the latest drivers from the synaptics Web site. Nothing works not so far

    HEAT:
    The bottom tends to run very hot even with normal web browsing, so I can not put the thing on my lap for a long time. I have install the fan to operate always from the BIOS, but its still the same. At this temperature, I do not know how long the material is going to hold up

    Sorry for the long post, I really hope you guys can help me understand things

    After a lot of frustration, for the past few weeks my touchpad has been behaving satisfactorily. Here's what I've done, maybe it will help someone else here who has the same problem:

    • Make sure the driver is updated to 192.0.12.107
    • Go to Device Manager, open the properties of the mouse and click on 'Update device driver.
    • In the wizard that opens, click on "Browse my computer for driver software".
    • Then select "Let Me pick from a list of drivers for devices on my computer.
    • In the next window, uncheck "See list of compatible hardware" and search for and select "Synaptics Clickpad SMBus"
    • Install and reboot the computer

    Windows installs the driver Synaptics Touchpad of SMBus by default, which leads to the scrolling issues I was experiencing. The pilot clickpad works much better. I don't know how the two drivers are different, but it worked for me

  • easy question - position of ScrollBar in listbox problem

    Hello once again

    This time, my question is simple...

    is there a way to set the initial position of a vertical scrollbar to a listbox?

    sometimes - if I make more runnings - remain in memory the last position... and if the new listbox is smaller, then the last i see a white listbox and I think that something was wrong in my program


  • using the App: variable scrollbar help and problems

    It is a large amount of code, but please bare with me please.  I would really appreciate the help!

    If I write a financial application where the user enters the initial investment, the compound interest rate period and duration of investment and it calculates the value.  Here is my code: each "screen" that appears on the emulator is its own class:

    package com.rim.samples.Finance;
    
    import net.rim.device.api.ui.UiApplication;
    
    public class FinanceApplication extends UiApplication
    {
        //VARIABLES FOR THE INVESTMENT GROWTH
        public double initialInvestment;
        public double interest;
        public int compoundPeriod;
        public int investmentLength;
    
        public static void main(String[] args)
        {
            FinanceApplication firstApplication  = new FinanceApplication();
            firstApplication.enterEventDispatcher();
        }
    
        public FinanceApplication()
        {
            //OPENING SCREEN FOR INVESTMENT GROWTH
            pushScreen(new Screen1());
        }
    
    }
    
    //SCREEN 1 INPUTS *INITIAL INVESTMENT*
    
    package com.rim.samples.Finance;
    
    import net.rim.device.api.ui.Color;
    import net.rim.device.api.ui.DrawStyle;
    import net.rim.device.api.ui.Field;
    import net.rim.device.api.ui.FieldChangeListener;
    import net.rim.device.api.ui.Font;
    import net.rim.device.api.ui.Manager;
    import net.rim.device.api.ui.MenuItem;
    import net.rim.device.api.ui.UiApplication;
    import net.rim.device.api.ui.XYEdges;
    import net.rim.device.api.ui.component.BasicEditField;
    import net.rim.device.api.ui.component.ButtonField;
    import net.rim.device.api.ui.component.Dialog;
    import net.rim.device.api.ui.component.LabelField;
    import net.rim.device.api.ui.component.Menu;
    import net.rim.device.api.ui.component.SeparatorField;
    import net.rim.device.api.ui.container.HorizontalFieldManager;
    import net.rim.device.api.ui.container.MainScreen;
    import net.rim.device.api.ui.container.VerticalFieldManager;
    import net.rim.device.api.ui.decor.Border;
    import net.rim.device.api.ui.decor.BorderFactory;
    
    public class Screen1 extends MainScreen implements FieldChangeListener
    {
    
        //DECLARE MENU BUTTONS
        protected void makeMenu(Menu menu, int instance)
        {
    
            menu.add(_close);
        }
        private MenuItem _close = new MenuItem("Close", 110, 10)
        {
            public void run()
            {
                onClose();
            }
        };
        public boolean onClose()
        {
            Dialog.alert("Goodbye!");
            System.exit(0);
            return true;
        }
    
        //SCREEN 1 METHOD
        Screen1()
        {
    
            HorizontalFieldManager _fieldManagerTop = new HorizontalFieldManager(Manager.VERTICAL_SCROLL | Manager.VERTICAL_SCROLLBAR);
            VerticalFieldManager _fieldManagerMiddle = new VerticalFieldManager(Manager.VERTICAL_SCROLL | Manager.VERTICAL_SCROLLBAR);
            HorizontalFieldManager _fieldManagerBottom = new HorizontalFieldManager(Manager.VERTICAL_SCROLL | Manager.VERTICAL_SCROLLBAR);
            HorizontalFieldManager _fieldManagerButton = new HorizontalFieldManager(Manager.VERTICAL_SCROLL | Manager.VERTICAL_SCROLLBAR);
    
            //SET TITLE: FINANCIAL APPLICATION
            LabelField title = new LabelField ("Financial Application", LabelField.USE_ALL_WIDTH | DrawStyle.HCENTER);
            Font titleFont = this.getFont().derive(Font.BOLD | Font.ITALIC);
            title.setFont(titleFont);
            setTitle(title);
    
            //SET PAGE & INFO TEXT
            LabelField _page = new LabelField("Homepage ~ Initial Investment", LabelField.USE_ALL_WIDTH | DrawStyle.HCENTER);
            LabelField _info = new LabelField("\nThis application acts as a an investment or growth calculator.  The user inputs the amount of money he or she would like to invest originally, input the interest, the compound period, the regular monthly deposit into the investment, and the time her or she will have the investment and this application will calculate how much the investment will be worth.\n\n Please enter initial amount of money you are depositing into the investment.\n$XX.xx", LabelField.USE_ALL_WIDTH);
    
            //INPUT FIELDS TESTING!!!!
    
            //INPUT FIELD W/ BORDER
            BasicEditField _input = new BasicEditField();
    
            XYEdges padding = new XYEdges(10, 10, 10, 10);
            int color = Color.DARKGREEN;
            int lineStyle = Border.STYLE_SOLID;
            Border inputBorder = BorderFactory.createRoundedBorder(padding, color, lineStyle);
            _input.setBorder(inputBorder);
    
            //ADD FIELDS AND SEPARATORS
            add(_fieldManagerTop);
            add(new SeparatorField());
            add(_fieldManagerMiddle);
            add(new SeparatorField());
            add(_fieldManagerBottom);
            add(new SeparatorField());
            add(_fieldManagerButton);
    
            //ADD PAGE, INFO, INPUT
            _fieldManagerTop.add(_page);
            _fieldManagerMiddle.add(_info);
            _fieldManagerBottom.add(_input);
    
            //CREATE BUTTON TO NEXT PAGE
            ButtonField pressButton = new ButtonField("NEXT");
            pressButton.setChangeListener(this);
            _fieldManagerButton.add(pressButton);
    
        }
    
        //BUTTON FIELD CHANGE: ACTIONS
        public void fieldChanged(Field field, int context)
        {
            // PROBLEM IS HERE, I WANT WHATEVER IS TYPED INTO _input TO BE SET AS THE VARIABLE initialInvestmentFinanceApplication.initialInvestment=_input;
    
            UiApplication.getUiApplication().popScreen(this);
            UiApplication.getUiApplication().pushScreen(new Screen2());
    
        }
    
    }
    
    //SCREEN 2 INPUTS *INTEREST*
    
    package com.rim.samples.Finance;
    
    import net.rim.device.api.ui.Color;
    import net.rim.device.api.ui.DrawStyle;
    import net.rim.device.api.ui.Field;
    import net.rim.device.api.ui.FieldChangeListener;
    import net.rim.device.api.ui.Font;
    import net.rim.device.api.ui.MenuItem;
    import net.rim.device.api.ui.UiApplication;
    import net.rim.device.api.ui.XYEdges;
    import net.rim.device.api.ui.component.BasicEditField;
    import net.rim.device.api.ui.component.ButtonField;
    import net.rim.device.api.ui.component.Dialog;
    import net.rim.device.api.ui.component.LabelField;
    import net.rim.device.api.ui.component.Menu;
    import net.rim.device.api.ui.component.SeparatorField;
    import net.rim.device.api.ui.container.HorizontalFieldManager;
    import net.rim.device.api.ui.container.MainScreen;
    import net.rim.device.api.ui.container.VerticalFieldManager;
    import net.rim.device.api.ui.decor.Border;
    import net.rim.device.api.ui.decor.BorderFactory;
    
    public class Screen2 extends MainScreen implements FieldChangeListener
    {
        //DECLARE MENU BUTTONS
        protected void makeMenu(Menu menu, int instance)
        {
            menu.add(_home);
            menu.add(_close);
        }
    
        private MenuItem _home = new MenuItem("Home Page", 110, 10)
        {
                public void run()
                {
                    onHome();
                }
        };
    
        public boolean onHome()
        {
            Dialog.alert("Homepage Selected");
            UiApplication.getUiApplication().popScreen(this);
            UiApplication.getUiApplication().pushScreen(new Screen1());
            return true;
        }
    
        private MenuItem _close = new MenuItem("Close", 110, 10)
        {
            public void run()
            {
                onClose();
            }
        };
    
        public boolean onClose()
        {
            Dialog.alert("Goodbye!");
            System.exit(0);
            return true;
        }
    
        //SCREEN 2 METHOD
        Screen2()
        {
            HorizontalFieldManager _fieldManagerTop = new HorizontalFieldManager();
            VerticalFieldManager _fieldManagerMiddle = new VerticalFieldManager();
            HorizontalFieldManager _fieldManagerBottom = new HorizontalFieldManager();
            HorizontalFieldManager _fieldManagerButton = new HorizontalFieldManager();
    
            //SET TITLE: FINANCIAL APPLICATION
            LabelField title = new LabelField ("Financial Application", LabelField.USE_ALL_WIDTH | DrawStyle.HCENTER);
            Font titleFont = this.getFont().derive(Font.BOLD | Font.ITALIC);
            title.setFont(titleFont);
            setTitle(title);
    
            //SET PAGE & INFO TEXT
            LabelField _page = new LabelField("Page Two ~ Interest", LabelField.USE_ALL_WIDTH | DrawStyle.HCENTER);
            LabelField _info = new LabelField("\nNow please enter the interest that will be put on this investment", LabelField.USE_ALL_WIDTH);
    
            //INPUT FIELD W/ BORDER
            BasicEditField _input = new BasicEditField();
            XYEdges padding = new XYEdges(10, 10, 10, 10);
            int color = Color.DARKGREEN;
            int lineStyle = Border.STYLE_SOLID;
            Border inputBorder = BorderFactory.createRoundedBorder(padding, color, lineStyle);
            _input.setBorder(inputBorder);
    
            //ADD FIELDS AND SEPARATORS
            add(_fieldManagerTop);
            add(new SeparatorField());
            add(_fieldManagerMiddle);
            add(new SeparatorField());
            add(_fieldManagerBottom);
            add(new SeparatorField());
            add(_fieldManagerButton);
    
            //ADD PAGE, INFO, INPUT
            _fieldManagerTop.add(_page);
            _fieldManagerMiddle.add(_info);
            _fieldManagerBottom.add(_input);
    
            //CREATE BUTTON TO NEXT PAGE
            ButtonField pressButton = new ButtonField("NEXT");
            pressButton.setChangeListener(this);
            _fieldManagerButton.add(pressButton);
    
        }
    
        //BUTTON FIELD CHANGE: ACTIONS
        public void fieldChanged(Field field, int context)
        {
            UiApplication.getUiApplication().popScreen(this);
            UiApplication.getUiApplication().pushScreen(new Screen3());
        }
    }
    
    //SCREEN 3 INPUTS *COMPOUND PERIOD*
    
    package com.rim.samples.Finance;
    
    import net.rim.device.api.ui.Color;
    import net.rim.device.api.ui.DrawStyle;
    import net.rim.device.api.ui.Field;
    import net.rim.device.api.ui.FieldChangeListener;
    import net.rim.device.api.ui.Font;
    import net.rim.device.api.ui.MenuItem;
    import net.rim.device.api.ui.UiApplication;
    import net.rim.device.api.ui.XYEdges;
    import net.rim.device.api.ui.component.BasicEditField;
    import net.rim.device.api.ui.component.ButtonField;
    import net.rim.device.api.ui.component.Dialog;
    import net.rim.device.api.ui.component.LabelField;
    import net.rim.device.api.ui.component.Menu;
    import net.rim.device.api.ui.component.ObjectChoiceField;
    import net.rim.device.api.ui.component.SeparatorField;
    import net.rim.device.api.ui.container.HorizontalFieldManager;
    import net.rim.device.api.ui.container.MainScreen;
    import net.rim.device.api.ui.container.VerticalFieldManager;
    import net.rim.device.api.ui.decor.Border;
    import net.rim.device.api.ui.decor.BorderFactory;
    
    public class Screen3 extends MainScreen implements FieldChangeListener
    {
        //DECLARE MENU BUTTONS
        protected void makeMenu(Menu menu, int instance)
        {
            menu.add(_home);
            menu.add(_close);
        }
    
        private MenuItem _home = new MenuItem("Home Page", 110, 10)
        {
                public void run()
                {
                    onHome();
                }
        };
    
        public boolean onHome()
        {
            Dialog.alert("Homepage Selected");
            UiApplication.getUiApplication().popScreen(this);
            UiApplication.getUiApplication().pushScreen(new Screen1());
            return true;
        }
    
        private MenuItem _close = new MenuItem("Close", 110, 10)
        {
            public void run()
            {
                onClose();
            }
        };
    
        public boolean onClose()
        {
            Dialog.alert("Goodbye!");
            System.exit(0);
            return true;
        }
    
        //SCREEN 3 METHOD
        Screen3()
        {
    
            HorizontalFieldManager _fieldManagerTop = new HorizontalFieldManager();
            VerticalFieldManager _fieldManagerMiddle = new VerticalFieldManager();
            HorizontalFieldManager _fieldManagerBottom = new HorizontalFieldManager();
            HorizontalFieldManager _fieldManagerButton = new HorizontalFieldManager();
    
            //SET TITLE: FINANCIAL APPLICATION
            LabelField title = new LabelField ("Financial Application", LabelField.USE_ALL_WIDTH | DrawStyle.HCENTER);
            Font titleFont = this.getFont().derive(Font.BOLD | Font.ITALIC);
            title.setFont(titleFont);
            setTitle(title);
    
            //SET PAGE & INFO TEXT
            LabelField _page = new LabelField("Page Three ~ Compound Period", LabelField.USE_ALL_WIDTH | DrawStyle.HCENTER);;
            LabelField _info = new LabelField("\nNow please enter the compound period.\npress spacebar to go through the choices:", LabelField.USE_ALL_WIDTH);;
    
            //ADD FIELDS AND SEPARATORS
            add(_fieldManagerTop);
            add(new SeparatorField());
            add(_fieldManagerMiddle);
            add(new SeparatorField());
            add(_fieldManagerBottom);
            add(new SeparatorField());
            add(_fieldManagerButton);
    
            //OBJECT CHOICE FIELD
            String choicestrs[] = {"Weekly", "Bi-Weekly", "Monthly", "Quarterly", "Annually"};
            ObjectChoiceField choice = new ObjectChoiceField("Compound Period: ", choicestrs, 0);
    
            //ADD PAGE, INFO, OBJECT CHOIE TO FIELD
            _fieldManagerTop.add(_page);
            _fieldManagerMiddle.add(_info);
            _fieldManagerBottom.add(choice);
    
            //CREATE BUTTON TO NEXT PAGE
            ButtonField press2Button = new ButtonField("NEXT");
            press2Button.setChangeListener(this);
            _fieldManagerButton.add(press2Button);
    
        }
    
        //BUTTON FIELD CHANGE: ACTIONS
        public void fieldChanged(Field field, int context)
        {
            UiApplication.getUiApplication().popScreen(this);
            UiApplication.getUiApplication().pushScreen(new Screen4());
        }
    }
    
    //SCREEN 4 INPUTS *LENGTH OF INVESTMENT*
    
    package com.rim.samples.Finance;
    
    import net.rim.device.api.ui.Color;
    import net.rim.device.api.ui.DrawStyle;
    import net.rim.device.api.ui.Field;
    import net.rim.device.api.ui.FieldChangeListener;
    import net.rim.device.api.ui.Font;
    import net.rim.device.api.ui.MenuItem;
    import net.rim.device.api.ui.UiApplication;
    import net.rim.device.api.ui.XYEdges;
    import net.rim.device.api.ui.component.BasicEditField;
    import net.rim.device.api.ui.component.ButtonField;
    import net.rim.device.api.ui.component.Dialog;
    import net.rim.device.api.ui.component.LabelField;
    import net.rim.device.api.ui.component.Menu;
    import net.rim.device.api.ui.component.SeparatorField;
    import net.rim.device.api.ui.container.HorizontalFieldManager;
    import net.rim.device.api.ui.container.MainScreen;
    import net.rim.device.api.ui.container.VerticalFieldManager;
    import net.rim.device.api.ui.decor.Border;
    import net.rim.device.api.ui.decor.BorderFactory;
    
    public class Screen4 extends MainScreen implements FieldChangeListener
    {
        //DECLARE MENU BUTTONS
        protected void makeMenu(Menu menu, int instance)
        {
            menu.add(_home);
            menu.add(_close);
        }
    
        private MenuItem _home = new MenuItem("Home Page", 110, 10)
        {
                public void run()
                {
                    onHome();
                }
        };
    
        public boolean onHome()
        {
            Dialog.alert("Homepage Selected");
            UiApplication.getUiApplication().popScreen(this);
            UiApplication.getUiApplication().pushScreen(new Screen1());
            return true;
        }
    
        private MenuItem _close = new MenuItem("Close", 110, 10)
        {
            public void run()
            {
                onClose();
            }
        };
    
        public boolean onClose()
        {
            Dialog.alert("Goodbye!");
            System.exit(0);
            return true;
        }
    
        //SCREEN 4 METHOD
        Screen4()
        {
            HorizontalFieldManager _fieldManagerTop = new HorizontalFieldManager();
            VerticalFieldManager _fieldManagerMiddle = new VerticalFieldManager();
            HorizontalFieldManager _fieldManagerBottom = new HorizontalFieldManager();
            HorizontalFieldManager _fieldManagerButton = new HorizontalFieldManager();
    
            //SET TITLE: FINANCIAL APPLICATION
            LabelField title = new LabelField ("Financial Application", LabelField.USE_ALL_WIDTH | DrawStyle.HCENTER);
            Font titleFont = this.getFont().derive(Font.BOLD | Font.ITALIC);
            title.setFont(titleFont);
            setTitle(title);
    
            //SET PAGE & INFO TEXT
            LabelField _page = new LabelField("Page Four ~ Investment Length", LabelField.USE_ALL_WIDTH | DrawStyle.HCENTER);
            LabelField _info = new LabelField("\nNow please enter how long you will have this investment for?\nPlease enter the amount in months:", LabelField.USE_ALL_WIDTH);
    
            //INPUT FIELD W/ BORDER
            BasicEditField _input = new BasicEditField();
            XYEdges padding = new XYEdges(10, 10, 10, 10);
            int color = Color.DARKGREEN;
            int lineStyle = Border.STYLE_SOLID;
            Border inputBorder = BorderFactory.createRoundedBorder(padding, color, lineStyle);
            _input.setBorder(inputBorder);
    
            //ADD FIELDS AND SEPARATORS
            add(_fieldManagerTop);
            add(new SeparatorField());
            add(_fieldManagerMiddle);
            add(new SeparatorField());
            add(_fieldManagerBottom);
            add(new SeparatorField());
            add(_fieldManagerButton);
    
            //ADD PAGE, INFO, INPUT
            _fieldManagerTop.add(_page);
            _fieldManagerMiddle.add(_info);
            _fieldManagerBottom.add(_input);
    
            //CREATE BUTTON TO NEXT PAGE
            ButtonField pressButton = new ButtonField("NEXT");
            pressButton.setChangeListener(this);
            _fieldManagerButton.add(pressButton);
    
        }
    
        //BUTTON FIELD CHANGE: ACTIONS
        public void fieldChanged(Field field, int context)
        {
            UiApplication.getUiApplication().popScreen(this);
            UiApplication.getUiApplication().pushScreen(new InvestmentWorth());
        }
    }
    
    //INVESTMENT WORTH
    
    package com.rim.samples.Finance;
    
    import net.rim.device.api.ui.Color;
    import net.rim.device.api.ui.DrawStyle;
    import net.rim.device.api.ui.Field;
    import net.rim.device.api.ui.FieldChangeListener;
    import net.rim.device.api.ui.Font;
    import net.rim.device.api.ui.Manager;
    import net.rim.device.api.ui.MenuItem;
    import net.rim.device.api.ui.UiApplication;
    import net.rim.device.api.ui.XYEdges;
    import net.rim.device.api.ui.component.ButtonField;
    import net.rim.device.api.ui.component.Dialog;
    import net.rim.device.api.ui.component.LabelField;
    import net.rim.device.api.ui.component.Menu;
    import net.rim.device.api.ui.component.SeparatorField;
    import net.rim.device.api.ui.container.HorizontalFieldManager;
    import net.rim.device.api.ui.container.MainScreen;
    import net.rim.device.api.ui.container.VerticalFieldManager;
    import net.rim.device.api.ui.decor.Border;
    import net.rim.device.api.ui.decor.BorderFactory;
    
    public class InvestmentWorth extends MainScreen
    {
    
        //DECLARE MENU BUTTONS
        protected void makeMenu(Menu menu, int instance)
        {
    
            menu.add(_close);
        }
        private MenuItem _close = new MenuItem("Close", 110, 10)
        {
            public void run()
            {
                onClose();
            }
        };
        public boolean onClose()
        {
            Dialog.alert("Goodbye!");
            System.exit(0);
            return true;
        }
    
        //SCREEN 1 METHOD
        InvestmentWorth()
        {
    
            HorizontalFieldManager _fieldManagerTop = new HorizontalFieldManager(Manager.VERTICAL_SCROLL | Manager.VERTICAL_SCROLLBAR);
            VerticalFieldManager _fieldManagerMiddle = new VerticalFieldManager(Manager.VERTICAL_SCROLL | Manager.VERTICAL_SCROLLBAR);
            HorizontalFieldManager _fieldManagerBottom = new HorizontalFieldManager(Manager.VERTICAL_SCROLL | Manager.VERTICAL_SCROLLBAR);
    
            //SET TITLE: FINANCIAL APPLICATION
            LabelField title = new LabelField ("Financial Application", LabelField.USE_ALL_WIDTH | DrawStyle.HCENTER);
            Font titleFont = this.getFont().derive(Font.BOLD | Font.ITALIC);
            title.setFont(titleFont);
            setTitle(title);
    
            //SET PAGE & INFO TEXT
            LabelField _page = new LabelField("Homepage ~ Initial Investment", LabelField.USE_ALL_WIDTH | DrawStyle.HCENTER);
            LabelField _info = new LabelField("\nHere is the worth of your investment:\n", LabelField.USE_ALL_WIDTH);
    
            //INPUT FIELD W/ BORDER
            LabelField _worth = new LabelField();
            XYEdges padding = new XYEdges(10, 10, 10, 10);
            int color = Color.BLACK;
            int lineStyle = Border.STYLE_SOLID;
            Border inputBorder = BorderFactory.createRoundedBorder(padding, color, lineStyle);
            _worth.setBorder(inputBorder);
    
            //ADD FIELDS AND SEPARATORS
            add(_fieldManagerTop);
            add(new SeparatorField());
            add(_fieldManagerMiddle);
            add(new SeparatorField());
            add(_fieldManagerBottom);
    
            //ADD PAGE, INFO, INPUT
            _fieldManagerTop.add(_page);
            _fieldManagerMiddle.add(_info);
            _fieldManagerBottom.add(_worth);
    
        }
    
    }
    

    So when I run on the emulator, on Blackbery 8520 SDK emulator, it doesn't let me scroll upwards on the first screen to see the rest of the text, it's like the cursor on the button sticks or editing field base so it wont allow to exceed upwards the button or basic edit field , but I can scroll between them.

    Second problem is trying to address (as defined in the first class) variables to different edit fields so when something is typed in (double), it is placed in the variable to use in the rest of the program.  I want to make sure the basic edit fields only allow "double" number entered, otherwise it displays a message 'incorrect type '.   Please help me with this, or give me some advice.

    I would REALLY appreciate it.

    LabelFields will display several lines later the OS, so maybe this isn't a problem.  However, LabelFields are by default not active, so you can't scroll on them.  RichTextFields are active by default.  So either change your LabelFields for et focusable (style LabelField.FOCUSABLE) pr change to RichTextField, as the previous poster suggested.

    I do not understand your second question, what are the numbers 'double '?

    However, I was watching the styles FILTER_ that you can use to BasicEditField or watch extending TextFilter to check the characters that they are entered.  I suspect TextFilter is the right way to go, but I've never done anything like this.  But having a good overview in this field and classes that extends.

  • Small problem with scrollbars

    Hello

    I've implemented a custom Manager where I paint the scroll arrows myself.  It works fine on the touch non-ecran models, but when I try to scroll on the storm, the scroll bars are being developed faster than the screen is repainted, it looks like a big mess.

    Any ideas on how I can avoid this?

    I have attached a screenshot to illustrate the problem.

    FYI, my solution has worked.

    in the constructor:

    setScrollListener(this);
    

    Add this method in the handler:

    public void scrollChanged(Manager manager, int newHorizontalScroll, int newVerticalScroll) {
        invalidate();
    }
    

    I don't notice any effect on performance.

Maybe you are looking for

  • New to Apple and Mac Book

    I'm new on this and am going to buy a laptop for the first time. We love apple.  The MacBook Air Book and Air Book Pro is better than other brands. What are the positive and negative points. Also, can you get word, excel, and these options as well? T

  • I want to make Photo Christmas cards using 10 photos and a short story, as I have in the past.

    More than 5 years, I used iPhoto to make Christmas cards.  I don't like the format 10 photo with a brief description. I don't see this option with Photos

  • Keyboard: How to fix a few dead keys?

    After cleaning the keyboard some keys isn't is no longer function. I carefully removed the lid of one of these keys in order to check if the switch would be blocked, but it seems that the switch doesn't work anymore. Is it possible to replace individ

  • How do I copy My Documents on a USB

    I want to save my documents on a USB key, how do I do that: You have problems with programs Error messages Recent changes to your computer What you have already tried to solve the problem

  • DeskJet 4160 does not turn off.

    I saw the post with the same problem on an another DeskJet, but the solution was a replacement - my 4160 is out of warranty. I had the same indicators - the flashing of the button "we / off" and the "Summary" button flashing - but turn off the comput