Adding a child to spark scroller in as

Tried adding a child (group) to the scroller class by using the viewport function but it didnt seem to work. is there a way to add a scroller via as and then adding a group as its child ? right now the scroller was added to the stage using addElement and the group was added as its viewport. I tested by adding a textarea to the group and it did display. however i didnt see any scrollbars even though the textarea was 3000 pixels high.

Hi,
The following code is one way you can set up a scroller, when you add something to the group the scrollbars will appear if that object exceeds the scroller boundaries. When you add the oversized child component(I used a list here for simplicity) the scrollbars will kick in.
David
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
   xmlns:s="library://ns.adobe.com/flex/spark"
   xmlns:mx="library://ns.adobe.com/flex/mx">
<fx:Script>
<![CDATA[
import mx.controls.List;
protected function button1_clickHandler(event:MouseEvent):void
var mylist:List = new List()
mylist.x=0;mylist.y=0;mylist.height=500;mylist.width=500;
grp.addElement(mylist);
]]>
</fx:Script>
<s:Scroller left="10" top="10" width="400" height="400" id="scroller" minViewportInset="1" hasFocusableChildren="true">
<s:Group id="grp" top="0" left="0" bottom="0" right="0"/>
</s:Scroller>
<s:Button x="32" y="446" label="Button" click="button1_clickHandler(event)"/>
</s:Application>

Similar Messages

  • [svn:cairngorm3:] 15920: Adding the use of Spark component into ModuleC to add the scenario where a Module must be able to get its default spark skin  (currently this is failing due to a bug in the Module Lib)

    Revision: 15920
    Revision: 15920
    Author:   [email protected]
    Date:     2010-05-06 02:11:21 -0700 (Thu, 06 May 2010)
    Log Message:
    Adding the use of Spark component into ModuleC to add the scenario where a Module must be able to get its default spark skin (currently this is failing due to a bug in the Module Lib)
    Modified Paths:
        cairngorm3/trunk/libraries/ModuleTest/src/example/moduleC/ModuleC.mxml

    As the server.xml is big enough, I took the minimum portion of it. Hope u can proceed with it.
    <!-- Tomcat Root Context -->
    <Context path="" docBase="ROOT" debug="0"/>
    <!-- New contexts -->
    <Context path="/xyz" docBase="pathTo_xyz" debug="0" crossContext="true"/>
    <Context path="/pqr" docBase="pathTo_pqr" debug="0" crossContext="true"/>
    <!-- Tomcat Examples Context -->
    <Context path="/examples" docBase="examples" debug="0"
    reloadable="true" crossContext="true">
    You should also provide a WEB-INF folder under pqr or xyz folder.
    You should also provide a web.xml file under each WEB-INF folder.
    The minimal web.xml is
    <?xml version="1.0" encoding="UTF-8" ?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/j2ee/dtd/web-app_2_3.dtd">
    <web-app>
    </web-app>
    That's it. Try it out. Hope it is OK.
    Hafizur Rahman
    SCJP

  • Adding news ticker or text scroller in a jsf page

    Can anyone please give me some clue about adding news ticker or text scroller kind of component using jsf, richfaces or icefaces in which important information like information about available jobs can be shown?
    Thanks in advance.
    Edited by: 857452 on May 18, 2011 7:06 AM
    Edited by: 857452 on May 18, 2011 7:07 AM

    this is more the realm of javascript / ajax / DHTML, not JSF. JSF is server side, what you want to do is mostly client side. Only getting the data might involve the server.

  • Noob question about adding a child

    I'm exercising scripting and struggling with adding a child to a object when the creation of the child is wrapped in this function
    function makeBox():void {
    var box:Shape = new Shape;
    box.graphics.beginFill(0x66FF00);
    box.graphics.lineStyle(5, 0x6600CC);
    box.graphics.drawRect(mouseX, mouseY, 50, 50);
    addChild(box);
    Now I want to add the above shape as a child to this object
    var Clip:MovieClip = new MovieClip;
    addChild(Clip);
    if the first code was not a finction I have no problem to add the child by  Clip.addChild(box); but I cant figure out how to use it if it is as a function.

    I'm not clear on your true goal, but the thing with having all that code in the function is that because you declare the box inside the function it only has scope within the function.  If you want something outside the function to be able to utilize it then you need to declare it outside the function...
    var Clip:MovieClip = new MovieClip;
    addChild(Clip);
    var box:Shape;
    makeBox():
    Clip.addChild(box);
    function makeBox():void {
         box = new Shape();
         box.graphics.beginFill(0x66FF00);
         box.graphics.lineStyle(5, 0x6600CC);
         box.graphics.drawRect(mouseX, mouseY, 50, 50);

  • Adding a child to a Package -- problem...

    The package code below is directly out of the Adobe flash help system:
    It works fine as an external .as file.
    However, I want to add some buttons from the library.  I haven't been able to add another child, no matter where I put the code.  I also tried putting the code to add a button in the internal movie frame script, but when I put ANY script there, I get this error
    "1180: Call to a possibly undefined method addFrameScript."
    What am I missing?
    The add button script, where Sub1_Btn has been exported for Actionscript and set up as a class in the buttons property window.
    var Sub1:Sub1_Btn = new Sub1_Btn();
    Sub1.x = 10;
    Sub1.y = 30;
    var Sub1_txt:text = new text();
    Sub1_txt.text = "New Text";
    Sub1_txt.x = 10
    Sub1_txt.y = 30
    addChild (Sub1);
    The package I mentioned above:
    package {
    import flash.display.Sprite;
    import flash.net.URLLoader;
    import flash.net.URLRequest;
    import flash.text.StyleSheet;
    import flash.text.TextField;
    import flash.text.TextFieldAutoSize;
    import flash.events.IOErrorEvent;
    import flash.events.Event;
    import flash.events.MouseEvent;
    public class StyleSheet_parseCSSExample extends Sprite {
    private var loader:URLLoader = new URLLoader();
    private var field:TextField = new TextField();
    private var exampleText:String = "<h1>This is a headline</h1>"
                        + "<p>This is a line of text. <span class='bluetext'>"
                        + "This line of text is colored blue.</span></p>";
    private var sheet:StyleSheet = new StyleSheet();
    private var cssReady:Boolean = false;
    public function StyleSheet_parseCSSExample () {
    field.x = 10;
    field.y = 10;
    field.background = true;
    field.multiline = true;
    field.autoSize = TextFieldAutoSize.LEFT;
    field.htmlText = exampleText;
    field.addEventListener (MouseEvent.CLICK, clickHandler);
    addChild (field)
    var req:URLRequest = new URLRequest("test.css");
    loader.load (req);
    loader.addEventListener (IOErrorEvent.IO_ERROR, errorHandler);
    loader.addEventListener (Event.COMPLETE, loaderCompleteHandler);
    public function errorHandler (e:IOErrorEvent):void {
    field.htmlText = "Couldn't load the style sheet file.";
    public function loaderCompleteHandler (event:Event):void {
    sheet.parseCSS (loader.data);
    cssReady = true;
    public function clickHandler (e:MouseEvent):void {
    if (cssReady) {
    field.styleSheet = sheet;
    field.htmlText = exampleText;
    var style:Object = sheet.getStyle("h1");
    field.htmlText += "<p>Headline font-family is: " + style.fontFamily + "</p>";
    field.htmlText+="<p>Headline color is: "+style.color+"</p>";
    } else {
    field.htmlText="Couldn't apply the CSS styles.";

    Hi,
    The following code is one way you can set up a scroller, when you add something to the group the scrollbars will appear if that object exceeds the scroller boundaries. When you add the oversized child component(I used a list here for simplicity) the scrollbars will kick in.
    David
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
       xmlns:s="library://ns.adobe.com/flex/spark"
       xmlns:mx="library://ns.adobe.com/flex/mx">
    <fx:Script>
    <![CDATA[
    import mx.controls.List;
    protected function button1_clickHandler(event:MouseEvent):void
    var mylist:List = new List()
    mylist.x=0;mylist.y=0;mylist.height=500;mylist.width=500;
    grp.addElement(mylist);
    ]]>
    </fx:Script>
    <s:Scroller left="10" top="10" width="400" height="400" id="scroller" minViewportInset="1" hasFocusableChildren="true">
    <s:Group id="grp" top="0" left="0" bottom="0" right="0"/>
    </s:Scroller>
    <s:Button x="32" y="446" label="Button" click="button1_clickHandler(event)"/>
    </s:Application>

  • Error adding a child form to more than one form

    When I try to add a child form to more than one form, I get the following error:
    Error Keyword: SDK.ADDFKCON
    Description: Error Adding Foreign Key/Constraint.
    Remedy:
    Action: F
    Severity: H
    Help URL:
    Detail:
    The following is the log trace:
    ERROR,23 nov 2011 17:22:42,050,[XELLERATE.ADAPTERS],Event: SDH Drop Foreign Constraint has encountered an error.
    ERROR,23 nov 2011 17:22:54,519,[XELLERATE.DATABASE],ALTER TABLE UD_TICKET3 ADD (UD_ADUSER_KEY NUMBER(19) CONSTRAINT NN_UD_TICKET3_UD_ADUSER_KEY NOT NULL, CONSTRAINT FK_UD_TICKET3_UD_ADUSER FOREIGN KEY(UD_ADUSER_KEY) REFERENCES UD_ADUSER(UD_ADUSER_KEY))
    java.sql.SQLException: ORA-01758: table must be empty to add mandatory (NOT NULL) column
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
         at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:745)
         at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:210)
         at oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:961)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1285)
         at oracle.jdbc.driver.OracleStatement.executeUpdateInternal(OracleStatement.java:1772)
         at oracle.jdbc.driver.OracleStatement.executeUpdate(OracleStatement.java:1741)
         at com.thortech.xl.util.JDBCUtils.executeUpdate(Unknown Source)
         at com.thortech.xl.dataaccess.tcDataBase.writeStatement(Unknown Source)
         at com.thortech.xl.dataobj.tcDataBase.writeStatement(Unknown Source)
         at com.thortech.xl.client.events.tcSDHAddForeignConstraint.createColumns(Unknown Source)
         at com.thortech.xl.client.events.tcSDHAddForeignConstraint.implementation(Unknown Source)
         at com.thortech.xl.client.events.tcBaseEvent.run(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.runEvent(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.eventPostInsert(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.insert(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.save(Unknown Source)
         at com.thortech.xl.dataobj.tcTableDataObj.save(Unknown Source)
         at com.thortech.xl.ejb.databeansimpl.tcDataObjectBase.save(Unknown Source)
         at com.thortech.xl.ejb.databeansimpl.tcSDHBean.save(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.evermind.server.ejb.interceptor.joinpoint.EJBJoinPointImpl.invoke(EJBJoinPointImpl.java:35)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.TxRequiredInterceptor.invoke(TxRequiredInterceptor.java:50)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.SecurityRoleInterceptor.invoke(SecurityRoleInterceptor.java:47)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.InvocationContextPool.invoke(InvocationContextPool.java:55)
         at com.evermind.server.ejb.StatefulSessionEJBObject.OC4J_invokeMethod(StatefulSessionEJBObject.java:844)
         at tcSDH_RemoteProxy_6ocop18.save(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.evermind.server.rmi.RmiMethodCall.run(RmiMethodCall.java:53)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    ERROR,23 nov 2011 17:22:54,519,[XELLERATE.DATABASE],Class/Method: tcDataBase/writeStatement encounter some problems: ORA-01758: table must be empty to add mandatory (NOT NULL) column
    java.sql.SQLException: ORA-01758: table must be empty to add mandatory (NOT NULL) column
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
         at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:745)
         at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:210)
         at oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:961)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1285)
         at oracle.jdbc.driver.OracleStatement.executeUpdateInternal(OracleStatement.java:1772)
         at oracle.jdbc.driver.OracleStatement.executeUpdate(OracleStatement.java:1741)
         at com.thortech.xl.util.JDBCUtils.executeUpdate(Unknown Source)
         at com.thortech.xl.dataaccess.tcDataBase.writeStatement(Unknown Source)
         at com.thortech.xl.dataobj.tcDataBase.writeStatement(Unknown Source)
         at com.thortech.xl.client.events.tcSDHAddForeignConstraint.createColumns(Unknown Source)
         at com.thortech.xl.client.events.tcSDHAddForeignConstraint.implementation(Unknown Source)
         at com.thortech.xl.client.events.tcBaseEvent.run(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.runEvent(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.eventPostInsert(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.insert(Unknown Source)
         at com.thortech.xl.dataobj.tcDataObj.save(Unknown Source)
         at com.thortech.xl.dataobj.tcTableDataObj.save(Unknown Source)
         at com.thortech.xl.ejb.databeansimpl.tcDataObjectBase.save(Unknown Source)
         at com.thortech.xl.ejb.databeansimpl.tcSDHBean.save(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.evermind.server.ejb.interceptor.joinpoint.EJBJoinPointImpl.invoke(EJBJoinPointImpl.java:35)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.TxRequiredInterceptor.invoke(TxRequiredInterceptor.java:50)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.SecurityRoleInterceptor.invoke(SecurityRoleInterceptor.java:47)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.interceptor.system.DMSInterceptor.invoke(DMSInterceptor.java:52)
         at com.evermind.server.ejb.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:119)
         at com.evermind.server.ejb.InvocationContextPool.invoke(InvocationContextPool.java:55)
         at com.evermind.server.ejb.StatefulSessionEJBObject.OC4J_invokeMethod(StatefulSessionEJBObject.java:844)
         at tcSDH_RemoteProxy_6ocop18.save(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.evermind.server.rmi.RmiMethodCall.run(RmiMethodCall.java:53)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    ERROR,23 nov 2011 17:22:54,519,[XELLERATE.ADAPTERS],Event: Adding Foreign Constraint has encountered an error.
    How to correct this?
    Thank you!

    899043 wrote:
    Thanks for your reply!
    I have a form named UD_TICKET3. This form contains information about the ticket number and a comment about any action taken on a resource of identity. We want to add this form as a child of all the resources forms. The problem occurs when I try to add the child form to the second form.You cannot add same detail table (child form) to more than one master table (resource form).

  • Should Parent objects be updated when adding a child?

    Hi,
    I have 2 objects in a one to many relationship, a parent with a collection
    of child objects.
    My parent object is being updated when I add child objects to it -
    although nothing on the parent object has changed (except maybe the
    JDOLOCKX column).
    Is this meant to happen - as part of the optimistic locking? Does it try
    and lock the owner of the collection when a new member is added?
    Thanks in advance,
    Chris

    We are planning a metadata extension to permit writing to a collection
    without changing optimistic lock values for the owning class.
    I don't have a good feel for the time frame of the feature yet.
    -Patrick
    On 5/21/02 1:06 PM, in article acduqj$e4j$[email protected], "Chris
    Kimpton" <[email protected]> wrote:
    Hi,
    This is occuring across JVMs for me - so I have put a crude re-try
    facility in place - it has a few goes at doing the work and then gives up
    if that is not sufficient. Not nice, but it seems to work.
    Chris
    David A. King wrote:
    I too have seen this behavior, which becomes frustrating when adding many
    children concurrently--I receive ConcurrentModificationExceptions on the
    parent, even though the parent itself did not change (except of course the
    collection of children) with optimisitic locking. I have had to serialize
    transactions manually to avoid the exceptions.
    Thanks,
    David A. King
    Chris Kimpton wrote:
    Hi,
    I have 2 objects in a one to many relationship, a parent with a collection
    of child objects.
    My parent object is being updated when I add child objects to it -
    although nothing on the parent object has changed (except maybe the
    JDOLOCKX column).
    Is this meant to happen - as part of the optimistic locking? Does it try
    and lock the owner of the collection when a new member is added?
    Thanks in advance,
    Chris

  • Adding a Child

    Help!
    I'm not understanding how to add a child to a MovieClip. When
    I put in
    Oregon.addChild(Baker);
    where Oregon is a MovieClip converted to a symbol and
    Baker is also a MovieClip converted to a symbol and on the
    flash timeline, I get the following error:
    1017: The definition of base class MovieClip was not
    found.�
    Any ideas for this clueless newbie?

    As a very simplistic test I created an FLA and defined two
    movie clip symbols in the library, one a rectangle I called Oregon
    and another a circle I called Baker. I dragged one copy of each on
    to the stage, and I gave an instance name of "Oregon" to the copy
    of Oregon, and an instance name of "Baker" to the copy of Baker. I
    placed Oregon in the center of the stage and Baker off the stage so
    it wouldn't appear when I tested the movie clip. Each instance is
    on a separate layer, and my movie is only one frame in length.
    I added the following code to the first frame on a third
    layer:
    Baker.x = 0;
    Baker.y = 0;
    Oregon.addChild(Baker);
    trace(Oregon,Baker);
    When I run the clip, the circle shows up centered on the
    rectangle, and the output window shows:
    [object MovieClip] [object MovieClip]
    The point of all this is that I found it kind of strange the
    type of errors you're getting, and especially that the result of
    the trace statement kglad asked you to make was Class Oregon, Class
    Baker. I think that somehow you don't have a correct definition of
    the items you're trying to implement, and therefore you're getting
    the resultant errors. How exactly did you create your instances of
    Oregon and Baker in your FLA file?

  • Why can't I just use my debit card for adding my child to family share?!

    I want to use my child on family share but can't because I don't need or want a credit card, my bank has fraud protection, who actually just called me about fraud because I purchased the newest iPhone! I don't like credit cards. Why can't I just use my debit card as usual? Kids can get credit cards just as easily as they can debit cards! This is ridiculous. Why isn't there another option to verify I am the parent?! I am so beyond angry right now. Like I am being punished for not owning a credit card!! Otherwise there will be another way to do this. A person should have the freedom to use their chosen form of payment without missing out on all the options available. Honestly even if I wanted a credit card I haven't enough credit because of past mistakes. So this is not making me happy at all.

    Mad Parent,
    I feel your pain. We refuse to have credit cards, too; yet it's required in order to create a child's apple id. I will most definitely be leaving feedback with Apple. This is absolutely ridiculous that we can't just use our debit cards! Mine is a VISA. I use it to make CREDIT CARD transactions everywhere else, why not be able to use it the same way here!?
    I just had to restore my sons phone because he forgot his 4-digit password and got it disabled. I didn't have it already on my itunes so my only option was to restore it. I wanted to create his own apple id so he didn't have to keep using mine. Because every time he downloads a new game it automatically ends up on MY device as well, not just his. Anyway, he needs his own apple id. But, apparently, that won't be happening until Apple gets their heads out of their butts and figures out how to serve ALL of their customers!
    Signed,
    Equally Mad Parent

  • Adding info Icon to Spark Label

    I am trying to add a info Icon next to a Label in Flex so that when somebody hover over icon, they can see a tooltip but so far no lcuk as i dont see anything like that in spark label control. I m new to skining so do not want to goto that rout but any help with this regard will be greatly appreciated.
    Thanks

    Guessing that skinning is your best bet and it's really not that difficult if you take an hour or two to read carefully any one of a number of articles/introductions on the web.

  • Adding a child and set to center

    I have a very simple script that adds a DisplayObject child to a canvas.... My code is below.
    The only thing I cannot figure out how to do is make it to where the canvas is centered, like you would usually do with horizontalCenter="0" verticalCenter="0" ... For some reason or another, these options are not avaialbe in the actionscript...
    Can anyone point me in the right direction?
    private function AddNewCustomer():void {
            loadCanvas.visible = true;
            var AddCustomer:DisplayObject = new customer_form();
            AddCustomer.width = 500;
            AddCustomer.height = 500;
            AddCustomer.x = 50;
            AddCustomer.y = 50;
            loadCanvas.addChild(AddCustomer);

    loadCanvas.setStyle("horizontalCenter", 0);
    loadCanvas.setStyle("verticalCenter", 0);
    Any property you don't see when you do loadCanvas.xxx you can usually set using setStyle.
    Mark this as an answer if it helps out.
    Thanks

  • Defaulting the student status when adding a child.

    Hello All,
    How can we default the Student indicator in infotype 21 when we are trying to add a child under age 19 to always on.
    When I enter date of birth and hit enter it should default the Student indicator field to with a check mark when the child is under age 19.
    Please advice. Its urgent!
    Thanks,
    Chakri.

    Hi,
    You have to write an User Exit for this. Check this User Exit enhancement  PBAS0001. Hope this will solve your problem.
    Thanks,
    Sarika.

  • Adding a child canvas immediately

    Hi there,
    I'm trying to add a canvas to my application which fills the screen while a CPU intensive action runs in the background. No matter what I try, I cannot get the loading screen to appear until after the slow action has finished.
    Code (belongs in a subclass of Canvas):
    private function saveBitmap(event:ContextMenuEvent):void
        loadingScreen.visible = true;
        loadingScreen.appLoadingText.text = "Preparing bitmap...";
        addChild(loadingScreen);
        validateNow();
         // Slow code!
        var bmpd:BitmapData = new BitmapData(canv.width, canv.height);
        bmpd.draw(canv);
        var fr:FileReference = new FileReference();
        fr.addEventListener(Event.COMPLETE, removeLoadingScreen);
        fr.addEventListener(Event.CANCEL, removeLoadingScreen);
        var png:PNGEncoder = new PNGEncoder();
        var iba:ByteArray = png.encode(bmpd);
        fr.save(iba, "export.png");   
    Unfortunately sticking the slow code into callLater() doesn't work because then the FileReference() can't be created.
    Any ideas?
    Cheers

    Thanks for the reply. What I've ended up with is quite strange:
    private function saveBitmap(event:ContextMenuEvent):void
        loadingScreen.visible = true;
        loadingScreen.appLoadingText.text = "Preparing bitmap...";
        <point a>
        addChild(loadingScreen);
        validateNow();
        <point b>
        trace("Fired!");
    private function prepareBitmap(event:FlexEvent):void
        trace("Fired beta!");
        removeEventListener(FlexEvent.UPDATE_COMPLETE, prepareBitmap);
        var bmpd:BitmapData = new BitmapData(canv.width, canv.height);
        bmpd.draw(canv);
        var fr:FileReference = new FileReference();
        fr.addEventListener(Event.COMPLETE, removeLoadingScreen);
        fr.addEventListener(Event.CANCEL, removeLoadingScreen);
        var png:PNGEncoder = new PNGEncoder();
        var iba:ByteArray = png.encode(bmpd);
        fr.save(iba, "export.png");   
    If I put addEventListener(FlexEvent.UPDATE_COMPLETE, prepareBitmap); at point a, then I get "Fired beta" then "Fired" (this makes sense I think, since the validateNow() will block until the UPDATE_COMPLETE event is finished) with no loading screen.
    If I put it the listener at point b then "Fired" is first and the loading screen appears, followed by a small (5 sec?) delay before "Fired Beta" is printed and the application dies from "Error: Error #2176: Certain actions, such as those that display a pop-up window, may only be invoked upon user interaction, for example by a mouse click or button press.".

  • Adding serious of object to scroll pane

    hi,
    is it possiable to add a serious of text object to scrollpane.
    Now i have a table with 30 column each column total has to display on text, so i want to maintain 30 text. How can i set bound of this much components
    Pappiiiiiiiii

    I presume you want to add a series of Text objects - this may give you an idea:
    import java.awt.BorderLayout;
    import java.awt.GridLayout;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JPanel;
    import javax.swing.JScrollPane;
    import javax.swing.JTextField;
    public class ManyTextWindow extends JFrame
        JTextField fields [] = new JTextField[50];
        public ManyTextWindow(){
            init();
        public void init(){
            // I use a gridlayout on some panel
            JPanel p = new JPanel();
            p.setLayout(new GridLayout(0,2));
            // create the textfields and add them
            for(int i=0; i<fields.length; i++)
                p.add(new JLabel("Textfield " + i + ":"));
                fields[i] = new JTextField(String.valueOf(i));
                p.add(fields);
    JScrollPane pane = new JScrollPane();
    pane.setViewportView(p);
    add(pane, BorderLayout.CENTER);
    setDefaultCloseOperation(EXIT_ON_CLOSE);
    public static void main(String [] args)
    new ManyTextWindow().setVisible(true);

  • CUA client doesn't know any profile/role anymore after adding child system

    Hi,
    I did set up a CUA client on our Solman system. The client is client 500 which has been copied over from 000 via the SAP_CUST profile.
    In this client 500 I did create some users with the SAP_ALL profile, so no problem here.
    After adding a child system to the CUA, it seems that if I want to create a new user in the CUA client 500 it doesn't know any role/profile anymore which is standard available in this client.
    In PFCG I can find a lot of standard roles, but when adding one via SU01 I do get the error that it doesn't exist. The same goes for the profile SAP_ALL.
    Just to be clear, adding profiles or roles from child systems is not a problem, just adding roles or profiles for the CUA client itself doesn't seems to work anymore.
    I had this problem on a 7.0 solman system and now also on a 7.01.
    Did anyone had the same problem?
    Thanks,
    Gregory

    Hello Georges,
    I have exactly the same issue.
    I have created a new CUA. I have copie 001 client to 333 client, using SAP_ALL profile.
    Now, from CUA client (333), I cannot add any roles or profiles to my user.
    I have created an RFC D1CCLNT333, but it does not resolved the problem.
    Did you do anything else to fix your issue ?
    Thanks
    Best regards
    CP2009

Maybe you are looking for

  • ISE machine authentication timeout

    Hi all, We have a ISE infrastructure and we have enabled user and machine authentication through EAP-TLS. Everything is working fine except that every 1 hour user must log off and login again because machine authentication has, I think, expired! As y

  • Using Appointment Manager to create calendar items for course participation

    Is anyone using SAP's Appointment Manager in conjunction with LSO to create calendar entries in an external application (Lotus Notes) when people book participation in a training course?

  • MSI TWIN FROZ GAMING GTX 770 UEFI/GOP COMPATIBLE BIOS

    Hi, I just purchased a MSI TWIN FROZ GAMING GTX 770 SN 602-V282-220B1310063340 VBIOS MS-V282 NV282MS.352 BIOS 80.04.C3.OO.21(P2005-0000) i would like to use an UEFI/GOP compatible BIOS on it. Thanks in advance.

  • HTML editing

    I have searched through the archives about editing HTML but I can't seem to find a topic that answers my question. I designed my website using iWeb, but as I needed to add some internal hyperlinks before putting my page up on my school's server (I am

  • Are subtemplates used for static information only?

    Hello, Subtemplates can have some runtime information but are subtemplates only to display static information like company logo or terms & Conditions? Lets suppose, I have a template1 which displays all emplyoyees info from the employee database1, an