Alignment of child in the custom component in Flex 3

Hello

I am newbie to Flex and glued on the essential point.

I'm trying to align the children in a custom as Center horizontally and vertically from the Middle component but the result is not harmonizing at all.

It's my custom componet "LoadingPanel.mxml" under the component package which children I want to focus.

<?xml version="1.0" encoding="utf-8"?>
 
<mx:Panel xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" 
             width="100%"
             height="100%"                                   
             title="DCP v1.1" horizontalAlign="center" verticalAlign="middle">
     
     
     <mx:Panel backgroundColor="#BB3030" width="300" headerHeight="15">
           
           <mx:ProgressBar id="bar"
                                indeterminate="true"
                                labelPlacement="top"
                                minimum="0"
                                visible="true"
                                maximum="100"
                                label="Loading..." 
                                direction="right"
                                mode="manual"
                                width="100%"
                                trackHeight="14"
                                
                                color="#FFFFFF"/>
     </mx:Panel>
     </mx:Panel>

Here are my main application where I use this custom component

<?xml version="1.0" encoding="utf-8"?>
<mx: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" minWidth="955" minHeight="600" xmlns:component="component.*">
     <fx:Declarations>
           <!-- Place non-visual elements (e.g., services, value objects) here -->
     </fx:Declarations>
     <component:LoadingPanel/>
</mx:Application>

I also tried to give the alignment in the custom component instantiation.

<?xml version="1.0" encoding="utf-8"?>
<mx: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" minWidth="955" minHeight="600" xmlns:component="component.*">
     <fx:Declarations>
           <!-- Place non-visual elements (e.g., services, value objects) here -->
     </fx:Declarations>
     <component:LoadingPanel horizontalAlign="center" verticalAlign="middle"/>
</mx:Application>

I'm sure that there must be no way to do it, but it's hard luck for me.

Thank you

Mac

Jin

pls put your control on the box and set the property of the box horizontalAlign="center" verticalAlign="middle" , may be it will be wrk.

Tags: Flex

Similar Questions

  • Question about the use of the custom component class define what declarative component

    12.1.3 jdev

    I'm trying to define a declarative component with my custom component class.

    This is the code for my component jsf declarative. I'm trying to use the label on selectManyListbox attribute to pass queryClass for my component class name. It does not work. I also try to use f: attribute to my component class. It does not work too. Question 1: how to move my declarative component attribute to my class of component?

    < af:panelLabelAndMessage label = "#{attrs.displayLabel}" id = "dc_plam1" > "

    < af:switcher id = "dc_s1" defaultFacet = "a lot" facetName = "#{attrs.single eq 'true'?' unique ': 'a lot'}" >

    < f: facet name = "a lot" >

    < af:selectManyListbox id = "namingp1" simple = "true" label = "#{attrs.queryClass}" "

    ' autoSubmit Binding = "#{dropListComp.selectManyListBox}" = "true" valueChangeListener = "#{dropListComp.selectManyValueChange}" >

    < f: attribute name = "queryClass" value = "#{attrs.queryClass}" / >

    < / af:selectManyListbox >

    < / f: facet >

    < f: facet "single" = name >

    < af:selectOneListbox id = "sl_2" simple = "true" label = "#{attrs.queryClass} '"

    autoSubmit Binding = "#{dropListComp.selectOneListBox}" = "true" valueChangeListener = "#{dropListComp.selectOneValueChange}" > "

    < / af:selectOneListbox >

    < / f: facet >

    < / af:switcher >

    < / af:panelLabelAndMessage >

    That's how I try to retrieve the label or f: attribute queryClass in my component class. I get null for both directions.

    {} public void setSelectManyListBox (RichSelectManyListbox selectManyListBox)
    this.selectManyListBox = selectManyListBox;
    If (this.selectManyListBox.getChildCount () == 0) {}
    queryClass = (String) this.selectManyListBox.getLabel ();
    System.out.println (".. queryClass of the label..." + queryClass);
    If (queryClass is nothing)
    {
    queryClass = (String) this.selectManyListBox.getAttributes () .get ("queryClass");
    System.out.println (".. queryClass of attr..." + queryClass);
    }
    If (queryClass is nothing)
    queryClass = "glog.server.query.powerdata.InvolvedPartyQualQuery";
    this.selectManyListBox.getChildren () .addAll (buildDropListSelectItems (queryClass));
    }
    }

    Thank you.

    Hello

    If your declarative component has a defined class of request attribute then #{attrs.name_of_attribute} called from Java should be able to solve

    Frank

  • Need to include classes in the custom component

    Dear Experts,

    I have created custom components, for custom components, I used some different classes and jars and libs and now I want to include these pots, the lib and classes in the generation of custom component file.

    Please advise me how can I add these files in the component so that when I create the zip file included in the zip file.

    Please send me a link where I can get this information.

    Any help will be really appreciated.

    Kind regards

    Elena

    See the tutorial Services Intradoc

  • GET_SEARCH_RESULTS the inside of the custom component

    Greetings,

    I work with a custom component and have led to a question in the process. Basically, inside my component I have references of hyperlink to items in my content server (ex: [! - $wcmUrl ('resource', 'SAMPLE_CONTENT_ID')-].) Now, is in view of the content of an element ID, possible to find this element web site? I scoured all the possible metadata fields and not seen one, but maybe I'm a lack?

    Also, I have some experience with CRMI services available. However, when I try and run these services thanks to a component, my 'validateCheckInData' filter is not able to be executed. I guess that's due to a conflict between types DataBinder. I am able to easily enter the location of a given element web content on my local machine ID by using the code below:

    IdcClientManager Manager = new IdcClientManager();

    IdcClient idcClient = (idc_host) manager.createClient;

    UserContext IdcContext = new IdcContext (idc_user);

    DataBinder binding = idcClient.createBinder ();

    binder.putLocal ("IdcService", "GET_SEARCH_RESULTS");

    binder.putLocal ("QueryText", "dDocName < match >" "+ CONTENTID +"'");

    RequestResponse ServiceResponse = idcClient.sendRequest (userContext, binder);

    DataBinder serverBinder = requestResponse.getResponseAsBinder ();

    DataResultSet dataresultset = serverBinder.getResultSet ("SearchResults");

    DataObject dataobject = dataresultset.getRows () .get (0);

    String url = dataobject.get ('URL');

    If the web site field is not metadata, is it possible for me to run the service GET_SEARCH_RESULTS of my component? The lines above in bold indicate the issues I have with my code by copying and pasting from my local machine to my component code that is executed on the server.

    Thank you!

    > Would you mind critical code in my original post?

    Your code is absolutely horrible, just a joke, I would not dare to criticize the work of others.

    > A million Red flags arose when I had to start my DataBinder object Cast to point to the RIDC jar

    In general, I would not advise to use RIDC leave within a component. CRMI is a client-side technology, while the components (or filters) reside on the server. You use better intradoc API (see http://jonathanhult.com/blog/2012/12/where-are-the-intradoc-java-classes-located/)

  • How to manage the focus in the custom component

    Hallo. As you know some flex components have indigenous focus, like buttons, textinput, etc... I created a custom component which is a borderContainer... As you know, by default, if the user press TAB my BorderContainer will never receive the focus... I tryied to set a property as setFocus() and tabFobusEnabled to true, but I still have some problems with my borderContainer development... It's as if my app knows that my custom component is not a native component... Is there a way for my component to receive focus without problems?... Which is the best way to do this?

    Thx a lot

    Max

    Components must implement IFocusManagerComponent in order to receive the focus.

  • The custom component setting

    Hi all

    I assigned a custom column of the datagrid component with:

    dataGridColumn.itemRenderer = new ClassFactory (com.myNewComp);

    This component has a parameter.

    I am trying:

    dataGridColumn.itemRenderer ['myParameter'] = 2;

    But not workng.

    How to set this parameter is assigned to the datagrid column after?

    Thank you

    Johnny

    FYI,.

    var _ItemRendere:ClassFactory;

    _ItemRendere = new ClassFactory();

    _ItemRendere.generator = com.myNewComp;

    _ItemRendere.properties = {myParameter:2};

    dataGridColumn.itemRenderer = _ItemRendere;

    Best,

    Johnny

  • Use the custom component to retrieve form data

    Hi, I'm creating a custom component that can extract data from form for a task, when I run the component in the workflow, it will throw an exception:

    "com.adobe.idp.taskmanager.dsc.client.task.TaskImpl cannot be cast to com.adobe.idp.taskmanager.dsc.client.task.TaskInfo.

    on line:

    ' TaskInfo tinfo = taskManager.getTaskInfo (taskId);

    If I put the same code on a java console app to test it, it works fine.

    I tried Google but offer nothing for TaskImpl.

    Thank you

    hkho

    These links should help:

    http://help.Adobe.com/en_US/LiveCycle/9.0/componentXMLRef/webframe.html

    http://help.Adobe.com/en_US/LiveCycle/9.0/programLC/help/index.htm?content=001379.html

    http://www.Adobe.com/devnet/LiveCycle/articles/dsc_development.html

    -Note that for the import-package, it must be explicit.  specifying a.b.c won't matter in a.b.c.d classes.

    -for classes that you import, you can not have the jar in the classpath of component.xml and do not want it in included in your container of components.

    -If you use ServiceClientFactory.createInstance () without a context, then you will get the current context.  Which it is depends on how your service operation is called.  I have direct invocation by a user will have the context of the user.  So called by the engine of workflow in a long-lived process then it will run in a system context.  Since you call TaskManager to extract data from a task, rights of access apply so you should be aware of the context.  The context of the system has full access rights so it can get the desired results.  But runs under the context of the user calling, that user must be the owner of the task or the request fails.

  • Pass a parameter for the custom component - get null

    Main MXML (part of the code):

    < s:Application

    "" xmlns:ns1 = "*".

    creationComplete = "init (); >

    import MyComponent;

    private function init (): void {}

    var myArray:Array is ["FFF", "TT", "RRR"];.

    myComp.width = 200;

    myComp.height = 200;

    myComp.getArray = myArray;

    myContainer.rawChildren.addChild (myComp);

    }

    < fx:Declarations >

    < ns1:MyComponent id = "myComp" x = "0" y = "0" / >

    < / fx:Declarations >

    custom component:

    package 
    {
              public var getArray:Array;
    public class MyComponent extends Sprite { } trace (getArray); trace null
    }
    }

    What is myContainer?

    I have a working version with my container as UICOmponent inside the hand.

    SerializableAttribute public class MyComp extends Sprite

    {

    private var _getArray:Array;

    public void MyComp()

    {

    }

    public function get getArray (): Array

    {

    Return _getArray;

    }

    public function set getArray(value:Array):void

    {

    trace ("setter", value);

    _getArray = value;

    }

    }

    xmlns:s = "library://ns.adobe.com/flex/spark".

    xmlns:MX = "library://ns.adobe.com/flex/mx".

    "" xmlns:NS1 = "*".

    minWidth = "955" = "600" minHeight

    creationComplete = "init (); » >

    private function init (): void {}

    var myArray:Array is ["FFF", "TT", "RRR"];.

    myComp.width = 200;

    myComp.height = 200;

    myComp.getArray = myArray;

    myContainer.addChild (myComp);

    }

    ]]>

    Not sure whether what you are after but it traces:

    Setter FFF TTT, RRR

    Why do you add to rawChildren?

    C

  • Get the name of the custom component

    Hi all

    I have a canvas with a few custom such as components:

    < mx:Canvas id = 'test' width = '100 percent"height ="100% ">
    < custom: Form01 id = "Form01_mxml" visible = "false" x = "0" y = "0" / >

    < custom: Form02 id = "Form02_mxml" visible = "false" x = "0" y = "0" / >

    < custom: Form03 id = "Form03_mxml" visible = "false" x = "0" y = "0" / >

    < custom: Form04 id = "Form04_mxml" visible = "false" x = "0" y = "0" / >

    < / mx:canvas >

    In a menu, I configure the visibility to true to indicate the component I want.

    I would like to know what custom component is visible after a result of an event. Is - is this posible?

    I know I can do multiple if statements to see which element is visible or not as:

    If (Form01_mxml.visible == true) do something

    But I have many components and I would find the dynamic name.

    Thank you

    Johnny

    Instead of visible = "false".

    Use ViewStack

    x="0" y="0">

    var mychoice:Number = 2;

    and slect VS.selectedIndex = mychoice;

    and get the sΘlectionnΘe component as

    VS.selectedChild.id (/ / Form03_mxml)

  • Reset the custom component

    Hello!

    I have an application with some States.

    Each State shows a different custom component.

    My problem is that if someone types something in one of the States then changes state and returns then the text will always be there.

    Is there a way to reintitialize the custom on each display state component or do I have to create functions to reset everything myself?

    Thank you!

    Hello Mashup,

    You must manually reset all fields in your component to make the component reset...

    To clear the textInputs you must explicitly set the text property to empty to reset their and so...

    Thank you

    Jean Claude

  • How to import the custom component exported from flash cs3

    Hello

    I exported a custom component that I designed in flash cs3 as a SWC file. How to import it in my project flex and how to use it?

    Sorry if this is a stupid question. I'm new to flex. Thank you.

    You must add the swc file in your path of the project. Please check the following URL for more information about how to import Flash components in Flex project.
    http://www.Adobe.com/devnet/flash/articles/flex_component_workflow.html

    I hope this helps.

  • How to make the custom component space - fill?

    I am writing a custom for a space - component fill exercise. There could be several sentences in the exercise with several gaps – something that looks like this:

    London is the largest urban area in the __________. An important institution for two millennia, London history goes back to its founding by the _____.

    The component must be "generic" data will be fed to a database. I was wandering if someone could give me some advice to an existing solution or clues how to approach the issue.

    Although I got a fair amount of experience on the server side (java), this is my first attempt to write something that is 'displayed on the screen"and any help will be greatly appreciated.

    It is an interesting requirement. Flex, unlike html, is not oriented around a style of flow interface.

    Maybe a Tile container would work, but I anticipate formatting issues since the tile waits for fixed elements of width and height

    There is a component that someone created called a FlowBox, which would be likely to be a good starting point for the user interface. Then according to Amy, I would use Repeater to generate controls. This part would be pretty simple.

    Tracy

  • Custom component gR 10, 3 of the Complutense University of MADRID

    We have an obligation to build a custom, component in order to change enamel teample for 'Notice of expiry'. From now on, we have a component inside the 'custom' folder called "CS10gR35CoreUpdate" that has the file "query_notification_mail.htm" inside the folder teamplate and many other model. Now I will create a new custom component of the based on the existing "CS10gR35CoreUpdate" and edit the required file 'query_notification_mail.htm' and will allow this component of the Components Wizard and restarts the UCM.

    My Question is: how I'll make sure that new custom component is called when an email is sent for documents to be expired? What abt the existing one?

    Please help me as soon as possible, because I provide the soultion. Thank you!!

    Our custom component is not any file of defination resouce, and I do not see the loadorder in defination of resource. Where can I configure the order of loading on the custom component?

    Yes, that's what I meant (in the .hda folder).

    I have another Q? Is it safe to manually change model "query_notification_mail.htm" who that is on the inside:
    Install dir\custom\CS10gR35CoreUpdate\core\templates\query_notification_mail.htm, I ask this question because I have to make changes only in query_notification_mail.htm, so instead of creating the new component based on exit, if I change the file manually?

    What do you mean by "safe"? Of course, if change you it on a hard drive, it will work (ie. in this particular system, the change will apply). You should be careful when you implementCS10gRXCoreUpdate in the future (a global patch will replace most likely your changes). In general, the change of standard resources is not considered to be a very good practice (quick and dirty), but if it is a change in one system, you can probably live with that.

  • listening in the main application for event from custom component

    I have a component that custom im using an identifier.  I watch videos and tutorials on how to pass variables between applications and custom components. the problem im having is that tutorials or explanation you put the event on the custom component and then it refers to a function in the main application.

    Is a fair way to listen on the main application at the event begins? Ive been tempting for hours and I know there must be something im missing may not be so difficult. any help, I would be really grateful.

    Thank you

    Miguel

    Hello

    The following example has been done as a simple demonstration of States, but the connection (state1) component, is a simple custom event which is sent by the ok button on the connection, the event could be extended to transfer the information to connect to the main application, in this case because the login screen is always public vars or fields of the box would be available for the main application anyway.

    http://gumbo.flashhub.NET/Wizard/ source included

    David.

  • Problem in the use of custom component.

    I want to create a component that is customized by using action script
    I use flex builder 2.
    I looked at the flex guide 2 devlopers and tried with the simplest example, having two parts:

    MyButton.as file for the custom component:
    the myControls package
    {
    Import mx.controls.Button;
    public class MyButton extends button
    {
    public void MyButton (): void
    {

    }
    }
    }

    the main application mxml file contains:
    <? XML version = "1.0" encoding = "utf-8"? >
    < mx:Application
    ' xmlns:MX =' http://www.adobe.com/2006/mxml '
    layout = "absolute" xmlns:myControls = "myControls.*" >
    < myControls:MyButton width = "100" height = "25" / >
    < / mx:Application >

    When compiling, flex builder displays a message:
    Errors exist in the project (s) required: MyProject
    Continue the launch?

    However, when I remove the following line from the main application file:
    < myControls:MyButton width = "100" height = "25" / >
    It runs successfully.

    Please someone help if there is any question about.

    The only thing I can think is that MyButton.as is not a directory of myControls, with myControls directory is a subdirectory of the directory is your mxml file. It's the only thing I can think of.

Maybe you are looking for

  • After the BIOS update can not startup Satellite C640 using USB key

    After upgrading my bios Toshiba Satellite C640-10F (PSC02E) to WIN 2.00, I can't boot the laptop using USB key, when I checked the BIOS with F2, I was stunned because the USB port connected to the laptop has been labeled as FLOPPY drive. Y at - there

  • iTunes streaming - visible in iTunes but empty

    After you play with the settings of a dis - / iTunes streaming the ReadyNAS 102 reactivation comes as a shared library in iTunes but is empty. I see all music and video files in VLC.

  • Cannot switch to Win 7 SP1

    I have a HP Slimline s5670t. When I recently tried upgrading to Explorer 11, the installer told me that I have Win 7 SP1. The computer came with Win 7, but not SP1. I did my utmost to update and install SP1 only to find out that it will not be instal

  • How to find my restore point name

    I tried to create the control system, but I don't know what the cription I should put

  • development tool for the blackberry application user interface

    Hello I have recently started the development of blackberry and I have good experience for other mobile platforms. For UI design, I couldn't find any tool. Is there a tool available to design the UI drag-and - drop controls. or I have to create all t