Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6174125
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T23:41:56+00:00 2026-05-23T23:41:56+00:00

Hello my good people of stackOverflow, Recently, i was building a component where a

  • 0

Hello my good people of stackOverflow,

Recently, i was building a component where a certain dropDownList component with id = languageCombo, has to be relocated dynamically as the states change..here is the code for the two states: initial and chaingrp. i want the dropDownList component to change from one position X in the initial state to another position X = 500 in the tree_changeHandler function when the chaingrp state is called but the dropDownList component doesn’t change. Could anyone point me to what the problem could be?

Thanks

<?xml version="1.0" encoding="utf-8"?>
<s:Group xmlns:fx="http://ns.adobe.com/mxml/2009"
     xmlns:s="library://ns.adobe.com/flex/spark"
     xmlns:mx="library://ns.adobe.com/flex/mx"
     xmlns:components="components.*"
     xmlns:searchComponents="searchComponents.*"
     minHeight="500" minWidth="500">


<fx:Metadata>
    [Event(name="SearchClick", type="eventClass.SelectedTableEvent")]
</fx:Metadata>



<fx:Script>
    <![CDATA[
        import eventClass.SelectedTableEvent;

        import mx.collections.ArrayCollection;
        import mx.events.ListEvent;
        import mx.events.TreeEvent;

        import spark.events.IndexChangeEvent;
        namespace simo="http://www.simo-project.org/simo";
        [Bindable]
        public var parentXmlCopy:XML;
        [Bindable]
        public var treeXml:XML;
        [Bindable]
        private var newXml:XML;
        private var transferredname:String;
        public var  modelType:String;
        public var selectedModelchainIndex:int;
        public var selectedTaskIndex:int;





        public function set variables(_xml:XML):void{
            parentXmlCopy = _xml;   
        }

        private function languageChange(event:Event):void{
            trace("languageChange");
            var cb:DropDownList=event.target as DropDownList;
            var temp:Object=cb.selectedItem;


            var chain:Array=[];
            for (var i:int=0; i < cb.dataProvider.length; i++)
            {
                if(cb.dataProvider[i].label == temp.label)
                {
                    chain.push(cb.dataProvider[i].locale);
                    resourceManager.localeChain=chain;
                }
            }

        }






        protected function tree_changeHandler(event:ListEvent):void
        {
            use namespace simo;
            var selectedItem:XML;

            transferredname = tree.selectedItem.localName();

            switch (transferredname){

                case "chain_group" : currentState = "chaingroup";
                 languageCombo.X = 500;

                 selectedItem = XML(tree.selectedItem);

                 trace(selectedItem);

                 this.chainGrpId.displayChainGrp(selectedItem);
                break;

            }

        }


            private function treeLabel(item:Object):String
            {

            return item.localName();        
        }



    ]]>
</fx:Script>



<s:states>
    <s:State name="initial"/>
    <s:State name="chaingroup"/>

</s:states>

    <s:HGroup><!--overall outer Hgroup-->
    <s:HGroup gap="8">
        <s:HGroup gap="5">
            <s:VGroup  height="460" paddingLeft="10" paddingTop="5">
                <s:HGroup gap="3">
                    <searchComponents:AutoComplete/>
                    <s:Button 
                        id="searchBT" 
                        height="24" 
                        width="24" 
                        skinClass="skins.searchBTskin"/>
                </s:HGroup>
                <s:List id="treeDP" height="120" width="180" labelField="@name"
                        change="treeDP_changeHandler(event)">
                    <s:dataProvider>
                        <s:XMLListCollection source="{parentXmlCopy.children()}" />
                    </s:dataProvider>
                </s:List>
                <s:Button id="delListBT" label="delList"/>
                <s:HGroup gap="70">
                    <s:Button 
                        id="backBT"
                        label="back"
                        height="24" 
                        width="24" 
                        />
                    <s:Button 
                        id="nextBT"
                        label="next"
                        height="24" 
                        width="24" 
                        />

                </s:HGroup>


                <mx:Tree id="tree" dataProvider="{treeXml}" labelField="{treeXml.localName()}"
                         top="72" left="50" labelFunction="treeLabel"
                         maxHorizontalScrollPosition="20"
                         maxVerticalScrollPosition="10"
                         showRoot="true"
                         change="tree_changeHandler(event)"
                         height="225" width="180"/>


                <s:Button id="delTreeBT" label="delTree"/>
            </s:VGroup>




            <s:Group includeIn="chaingroup/>

        </s:HGroup>

    </s:HGroup>

<s:HGroup paddingLeft="200" paddingTop="5"
          x.modelOperation="-38" y.modelOperation="-22" width.modelOperation="737"
          x.modelPrediction="-18" y.modelPrediction="-20">
    <s:DropDownList id="languageCombo" width="150" change="languageChange(event)" includeIn="initial"
                    dataProvider="{new ArrayCollection([{locale:'fi_FI',label:'Suomi'}, {locale:'en_US', label:'English'}])}"
                    prompt="{resourceManager.getString('modelChainUI','lang')}"
                    x.chaingroup="900"
                    x.condition="900"
                    x.modelchain="900"
                    x.task="900"/>
</s:HGroup>
    </s:HGroup><!--overall hgroup ends here!-->

<s:VGroup gap="5" paddingLeft="10"
          x.chaingroup="144" y.chaingroup="-69" height.chaingroup="148">
    <components:ChainGroup id="chainGrpId" includeIn="chaingroup"/>
    </s:VGroup>

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T23:41:57+00:00Added an answer on May 23, 2026 at 11:41 pm

    Your languageCombo is within HGroup. HGroup is a container with horizontal layout. Horizontal layout doesn’t consider any x and y coordinates of children (because of it is horizontal layout).

    Maybe it better to use simple Group (taking in mind your HGroup has only one child — so horizontal layout hasn’t sense)?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hello good people of stackoverflow, this is a conceptual question and could possibly belong
Hello good people i came accross a weird behaviour in my test.I'm using JPA
Why hello there Stackoverflow, I have a nutcracker for ya, is there an good
Hello good people of Stack Overflow, I am having great troubles with designing a
Hello good people of Stack Overflow, I have come with yet another question for
Hello all you helpful folks @ stackoverflow! Best resources for Java GUI's? Looking at
good people. i'm trying to use quartz with spring in a very simple project
Hello any one knows a good tutorial where i can find a pointer to
Hello can somebody write or point to a good symfony plugin installation tutorial. Here
Hello good morning everyone, I am developing an iphone app which provide push notification

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.