Width of Dynamic Linkbutton

I have a linkbutton created in actionscript, with text
inputted into the box. I cannot get the width of the box. How can i
get the width of a linkbutton created dynamically

Hi Ukie,
If i've understood what you're asking correctly - to get the
width of a dynamically created link button you could do the
following:
<!--------------------------------------------------------------------------->
private function init():void
var linkBtn:LinkButton = new LinkButton();
linkBtn.x = 150;
linkBtn.y = 168;
linkBtn.name = "myLinkBtn";
linkBtn.label = 'My Dynamic Link Button';
myCanvas.addChild(linkBtn);
linkBtn.addEventListener(FlexEvent.CREATION_COMPLETE,
linkBtnHandler);
private function linkBtnHandler(evt:Event):void
trace(myCanvas.getChildByName('myLinkBtn').width);
<!--------------------------------------------------------------------------->
Just make sure you have the function init() in the
applications creationComplete event.
Hope this helps,
- Tony

Similar Messages

  • Creating a dynamic LinkButton

    Hi,
    I am creating a dynmaic linkbutton as follows:
    var myNewLinkBtn : LinkButton = new LinkButton;
    myNewLinkBtn.label = 'New Link Button';
    I am trying to add a click event to this. I thought
    myNewLinkBtn.click = 'somefunction()'; would work but it keeps
    giving me an "Access of possibly undefined property click through a
    reference with static type mx.controls:LinkButton." error.
    Does anyone have any ideas how I can assign a click event to
    a linkButton dynamically.
    thanks in advance
    Chris

    I tried importing import flash.events.*; and also mx.events.*
    but I am still getting the same error
    'Access of possibly undefined property CLICK through a
    reference with static type Class.'
    Have you any other ideas, thanks for you quick reply
    Regards
    Chris

  • Getting to the spine to width to dynamically update

    I have a 3 page spread and when I change the spine width, the front and back covers do not move with it. I know it can be done because I saw it on my Lynda.com training video (though ironically the books cover design series is done manually). I have CS5 and can use the page tool, but what options do I need to keep everything dynamic?

    It's not clear to me why it's not working. Can you provide screen shots before and after you change the spine width? Use the camera tool in the Post Reply dialog to send screen shots.

  • Problem in aligning dynamic UI with the static UI

    Hi All,
    I have problem in aligning dynamic UI with the static UI, I am using Matrix layout.
    Static fields are spread over 2 colums and 3 rows:
    lableA SPACE input field SPACESPACE lable B SPACE input field
    lableC SPACE dropdown SPACESPACElableD SPACE dropdown
    lableE SPACE dropdown SPACESPACElableF SPACE dropdown
    Now when a value is selected in C, than E becomes visible, and depending on the values selected in E, there are dynamic UI generated, i.e dynamic lables and depending on some validation it will be either a dropdowns or input fiels or both.
    at run time screen is like this:
    lableA SPACE input field SPACESPACE lable B SPACE input field
    lableC SPACE dropdown SPACESPACElableD SPACE dropdown
    lableE SPACE dropdown SPACESPACElableF SPACE dropdown
    dynaSPACEdropdown
    dynbSPACEinput field
    if I change my selection in E than layout looks like:
    lableA SPACE input field SPACESPACE lable B SPACE input field
    lableC SPACE dropdown SPACESPACElableD SPACE dropdown
    lableE SPACE dropdown SPACESPACElableF SPACE dropdown
    dynaSPACESPACEdropdown
    dynbSPACESPACEinput field
    Requirment: I need all the lables as well as dropdown/ input fiels in line with the static fields irrespective of my selection in E.
    Something like this:
    lableA SPACE input field SPACESPACE lable B SPACE input field
    lableC SPACE dropdown SPACESPACElableD SPACE dropdown
    lableE SPACE dropdown SPACESPACElableF SPACE dropdown
    dyna   SPACEdropdown
    dynbSPACESinput field
    dyncSPACESdropdown
    All this elements are in a group and that group has 2 transparent containers, 1 for static and for holding dynamic UI.
    I tried playing with the container properties, and also tried fixing width of dynamic UI but still the alignment issue is encountered.
    Can U guys plz give in ur valuable inputs as i need to fix this urgently.
    Regards,
    JJ

    Hi Armin,
    Can you please elaborate your solution ?, I do not have an idea of InvisibleElement & IWDView.resetView() ,
    If you can give me the exact pointer than it would be great and a good learning exp. for me.
    Thanks for the action assignment part, it worked.
    if (wdContext.nodeMaterialClass().size() > 0 && wdContext.currentContextElement().getActionMatCls()) {
         if (wdContext.currentMaterialClassElement().getMaterialClass_Description() != null || !wdContext.currentMaterialClassElement ().getMaterialClass_Description().equalsIgnoreCase(" ")) {
               IWDGroup Searchgroup = (IWDGroup) view.getElement("DynGroup");
    Searchgroup.destroyAllChildren();
    view.getContext().reset(false);
                                                      for (int i = 0; i < wdContext.nodeMaterialCharateristcs().size(); i++) {
                                  //this for label
         IWDLabel CharLabel = (IWDLabel) view.createElement(IWDLabel.class, "label" + i);
         CharLabel.setText(wdContext.nodeMaterialCharateristcs().getMaterialCharateristcsElementAt(i).getDescr_Char());
         CharLabel.setDesign(WDLabelDesign.EMPHASIZED);
         CharLabel.createLayoutData(MatrixHeadData.class);                              CharLabel.setWidth("154px");                              Searchgroup.addChild(CharLabel);
                 further there are conditions to create either dropdown or input field
    Can you please point where and how to apply your solution.
    Regards,
    JJ

  • Problem in print out of Dynamic ALV

    Hi ,
    I am using dynamic ALV to address a requirement. The ALV is working fine and the output is also coming corretly, even in spool.
    But if the width of dynamic table exceeds a limit, then nothing is coming in the print out.
    If anyone has faced similar problem or knows how to tackle this problem, please advise what can be done here.
    Thanks,
    Sonal

    Hi,
    Can you try to increase field with to maximun as per your requirement.
    Regards,
    Sai

  • How can i Auto Size the Column width in RDLC Report

    Hi Friend's,
    I have created Windows application with RDLC Report. I am binding(Generating) dynamic columns and data's in RDLC Report Using Matrix control, I need to make Auto size of Column width for each Column in
    Matrix of RDLC report. So Can any one suggest me to make the Auto Size of Column Width in RDLC.
    Thanks in Advance,
    Mohan G

    Hi Mohan,
    In Reporting Services, the column width/height is hard-coded, hence, we cannot set the column width/height dynamically or based on an expression. So is the report size.
    In addition, since it is a RDLC report, we need a ReportViewer control to display this report within a custom application. If you need to change the size of the whole report, we can set the AsyncRendering property of the ReportViewer control to false, and
    set the SizeToReportContent property to true.
    Regards,
    Mike Yin
    TechNet Community Support

  • Varying page widths in Safari.

    Would anyone know if they have solved the problem of Safari page widths not being consistent.   When browsing (through newspapers, for example) some pages load the proper size while others (Huffington is one example) are only 2/3rds the page width and with a corded mouse, need the assistance of the blue slider at the bottom.
    Recently I bought a Magic Mouse and that brings its own problems   With Huffington I find the page sliding around as the control from the mouse can be rather loose depending on the finger position.  Google is often worse with one in three pages needing the blue slider adjustment.
    I have yet to find a setting that will tailor web pages to generally match my computer screen size.   Yes, there are exceptions which I accept but have I missed something?

    Hi seventy one,
    I this this is a page programming issue, not a Safari (nor any other browser) or hardware issue.
    I was providing tech content when our firm rolled out its first website about 12 years age. We had I.T. employees who programmed the pages. in testing, I had noticed the pages failed to fill very much of the screen even in the days before widescreen monitors. They said they could have the pages dynamically fill the window width available but that would slow down the page response (understand most people were still on dial-up back them) and require more space on the servers (again, turn back the clock). They preferred low-feature leanness.
    Today, those capacity concerns are minor but pages still get programmed poorly. Look at Apple Support Community, provided by a third-party vendor: The content is stuck in the middle even on a wide monitor. Even Apple main pages want to use the "center lane."
    Now open Wikipedia--the page and column widths change dynamically as you resize a window until it gets to a point where the layout would go walkabout, then you get the scroll bars.
    I think if you will experiment with different web pages you will see my point.

  • Zooming a tag cloud.

    I'm trying to create a tag cloud and want it to fit within a given canvas.
    The idea is to create a tag cloud using the snippet below, and then scale it to fit within the enclosing canvas.
    <mx:Canvas>
    <flexlib:FlowBox id="tagContainer"
                 width="100%" height="100%"
                 horizontalScrollPolicy="off"
                 creationComplete="extentsCheck()">
    <mx:Repeater dataProvider="{dataArray}" id="tag_list">
        <mx:LinkButton fontWeight="normal"
                      label="{tag_list.currentItem.label}"
                       fontSize="{tag_list.currentItem.size}"
                       click="tagClickHandler(event)"
                       creationComplete="tagAdded(event)"
                       dataChange="tagAdded(event)"             
                       />
    </mx:Repeater>
    </flexlib:FlowBox>
    </mx:Canvas>
    I'm limiting the number of tags to gain some control of the layout. However, approx 1-1.5 rows of tags
    is getting clipped, depending on the tags. I'd like to scale this to fit within a given height (200 px - of the parent layout).
    I'm however having a hard time caculating the needed scaling factor. The creationComplete and dataChange events
    seem to have a height/width of 0. The linkButtons are not being rendered on the screen either until the repeater has finished it's business.
    Wondering what I am missing and how a zoom factor can be computed dynamically.
    My searches on Google and these forums did not yield anything useful.
    Thanks in advance for any help.
    -sr

    Not receiving any responses, I'll attempt to clarify the problem.
    The intent is to size a linkButton based on fontsize.
    I'd like to however determine the dimensions of the created linkButton.
    Each linkButton represents a tag and the set is contained inside a FlowBox, representing my tagcloud.
    The flowbox itself is contained inside a canvas of fixed dimensions.
    Depending on the exact tags and associated frequencies, I'm seeing trouble with tags being clipped.
    To prevent this, the intent is to figure the unclipped dimensions of the FlowBox and zoom is out enough to fit
    the containing canvas.
    Initially the thought was that the creationComplete event would be a good place to do the necessary math to figure the zoom ratio.
    Not so it seems - the x/y/height/width dimensions are 0 when trapped here.
    I've not been able to find a reliable way of computing the rendered height/width of the linkButton irrespective of which event I tried.
    dataChange/Show/Render.
    Hopefully this provides a better idea of my intentions and I'll find some help on the forum
    thanks,
    -sr

  • How To Populate An Advanced Data Grid In Flex With An XML Document Created In JAVA

    Flex Code:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Module xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="856" height="698" initialize="onInitData()">
        <mx:RemoteObject destination="utilityUCFlexRO" id="utilityUCFlexRO">
            <mx:method name="updateStationDetails" result="handleUpdateStationDetailsResult(event)" fault="handleUpdateStationDetailsFault(event)"/>
        </mx:RemoteObject>
        <mx:RemoteObject id="uniqueIdMasterUCFlexRO" destination="uniqueIdMasterUCFlexRO">
            <mx:method name="readByCustomerName" result="handleReadByCustomerNameResult(event)" fault="handleReadByCustomerNameFault(event)"/>
            <mx:method name="getCustomerAcDetails" result="handlegetCustomerAcDetailsResult(event)" fault="handlegetCustomerAcDetailsFault(event)"/>
        </mx:RemoteObject>
        <mx:Script>
            <![CDATA[
                import mx.events.ListEvent;
                import mx.collections.ItemResponder;
                import com.citizen.cbs.model.UniqueIdMaster;
                import mx.managers.PopUpManager;
                import mx.controls.ProgressBarMode;
                import mx.effects.Fade;
                import mx.controls.ProgressBar;
                import com.citizen.cbs.CitizenApplication;
                import mx.core.Application;
                import mx.messaging.messages.ErrorMessage;
                import mx.rpc.events.FaultEvent;
                import mx.rpc.events.ResultEvent;
                import mx.collections.ArrayCollection;
                import mx.controls.Alert;
                private var moduleCloseFlag:Boolean=false;
                private var v:UniqueIdMaster;
                [Bindable]
                private var customerDetails:ArrayCollection;
                [Bindable]
                private var branch:int=0;
                [Bindable]
                private var XMLDocument:XML;
                [Bindable]
                private var acDetails:XMLList;
                private var _progBar:ProgressBar = new ProgressBar();
                private function showLoading(e:Event = null):void
                    _progBar.width = 200;
                    _progBar.indeterminate = true;
                    _progBar.labelPlacement = 'center';
                    _progBar.setStyle("removedEffect", Fade);
                    _progBar.setStyle("addedEffect", Fade);
                    _progBar.setStyle("color", 0xFFFFFF);
                    _progBar.setStyle("borderColor", 0x000000);
                    _progBar.setStyle("barColor", 0x6699cc);
                    _progBar.label = "Please wait.......";
                    _progBar.mode = ProgressBarMode.MANUAL;
                    PopUpManager.addPopUp(_progBar,this,true);
                    PopUpManager.centerPopUp(_progBar);
                    _progBar.setProgress(0, 0);
                private function onInitData():void
                    utilityUCFlexRO.updateStationDetails(CitizenApplication.menuParameters["modulecode"]);
                private function handleUpdateStationDetailsResult(event:ResultEvent):void
                    if(moduleCloseFlag==true)
                        Application.application.unloadModule();
                private function handleUpdateStationDetailsFault(event:FaultEvent):void
                    var errorMessage:ErrorMessage = event.message as ErrorMessage;
                    Alert.show(errorMessage.rootCause.message);
                private function onSearch():void
                    if(txtName.text=="" || txtName.text==null)
                        Alert.show("Enter a name for search");
                        return;
                    if((txtName.text).length < 4)
                        Alert.show("Search should contain more than 3 alphabets");
                        return;
                    var d:String = txtName.text;
                    branch = CitizenApplication.initInfo.registeredUser.branchDetails.bdBranchNo;
                    uniqueIdMasterUCFlexRO.readByCustomerName(d,branch);
                    showLoading();
                private function handleReadByCustomerNameResult(event:ResultEvent):void                //In handle if record does not exists, dsiplays error message and resets the field
                    customerDetails =ArrayCollection(event.result);
                    PopUpManager.removePopUp(_progBar);
                    if(customerDetails.length==0)
                        Alert.show("Record Not Found, Enter Proper Name ");
                        onReset();
                private function handleReadByCustomerNameFault(event:FaultEvent):void
                    Alert.show(event.fault.faultDetail + " -- " + event.fault.faultString + "handleReadByCustomerNameFault");
                private function onReset():void
                    customerDetails=new ArrayCollection();
                    txtName.text="";
                private function onCancel():void
                    utilityUCFlexRO.updateStationDetails("MM0001");
                    moduleCloseFlag=true;
                private function btnBackClick():void
                    view1.selectedIndex=0;
                private function btnBackClick1():void
                    view1.selectedIndex=1;
                private function onItemClick( e:ListEvent ):void
                    if(dgCustDetails.selectedItem == null)
                        Alert.show("Select Proper Record");
                    else
                        lblId.text = e.itemRenderer.data.uimCustomerId;
                        lblName.text = e.itemRenderer.data.uimCustomerName;
                        var custId:int = Number(lblId.text);   
                        uniqueIdMasterUCFlexRO.getCustomerAcDetails(custId,branch);
                        showLoading();           
                private function handlegetCustomerAcDetailsResult(event:ResultEvent):void               
                    //XMLDocument = event.result as XML;
                    acDetails = new XMLList(event.result.menu);
                    //Alert.show("Name: "+event.result.@name);
                    PopUpManager.removePopUp(_progBar);
                    view1.selectedIndex=1;
                    //adg1.dataProvider=acDetails;
                private function handlegetCustomerAcDetailsFault(event:FaultEvent):void
                    PopUpManager.removePopUp(_progBar);
                    Alert.show(event.fault.faultDetail + " -- " + event.fault.faultString + "handlegetCustomerAcDetailsFault");
            ]]>
        </mx:Script>
        <mx:ViewStack height="688" width="856" id="view1">
            <mx:Canvas>
                <mx:Panel x="51" y="25" width="754" height="550" layout="absolute" title="Customer Search Page">
                    <mx:HBox x="174" y="26" horizontalAlign="center" verticalAlign="middle">
                        <mx:Label text="Enter Name:"/>
                        <mx:TextInput id="txtName" width="228"/>
                        <mx:LinkButton label="Search" click="onSearch()"/>
                    </mx:HBox>
                    <mx:Label text="--" id="lblId" x="40" y="194"/>
                    <mx:Label text="--" id="lblName" x="40" y="226"/>
                    <mx:DataGrid dataProvider="{customerDetails}" id="dgCustDetails" allowMultipleSelection="false" editable="false"
                        showHeaders="true" draggableColumns="false" width="718" height="373" itemClick="onItemClick(event);" x="10" y="61">
                        <mx:columns>
                            <mx:DataGridColumn headerText="Customer Id" dataField="uimCustomerId" width="150"/>
                            <mx:DataGridColumn headerText="Customer Name" dataField="uimCustomerName"/>
                        </mx:columns>
                    </mx:DataGrid>
                    <mx:ControlBar>
                        <mx:Button label="CANCEL" click="onCancel()" width="80"/>
                        <mx:Button label="RESET" click="onReset()" width="80"/>
                    </mx:ControlBar>
                </mx:Panel>
            </mx:Canvas>
            <mx:Canvas>
                <mx:TitleWindow x="10" y="10" width="836" height="421" layout="absolute">
                    <mx:AdvancedDataGrid x="6.5" y="10" id="adg1" designViewDataType="tree" variableRowHeight="true" width="807" height="278" fontSize="14">
                        <mx:dataProvider>
                              <mx:HierarchicalData source="{acDetails}"/>
                        </mx:dataProvider>
                        <mx:groupedColumns>
                            <mx:AdvancedDataGridColumn headerText="Type Of A/c" dataField="@Name" width="150"/>
                            <mx:AdvancedDataGridColumn headerText="Details Of A/c"/>
                        </mx:groupedColumns>
                        <mx:rendererProviders>
                            <mx:AdvancedDataGridRendererProvider id="adgpr1" depth="2" columnIndex="1" renderer="AcDetails1" columnSpan="0"/>
                        </mx:rendererProviders>
                    </mx:AdvancedDataGrid>
                    <mx:ControlBar height="56" y="335">
                        <mx:Button label="BACK" width="80" click="btnBackClick()"/>
                        <mx:Spacer width="100%"/>
                        <mx:Button label="EXIT" click="onCancel()" width="80"/>
                    </mx:ControlBar>
                </mx:TitleWindow>
            </mx:Canvas>
        </mx:ViewStack>
    </mx:Module>
    XML File Generated In JAVA:
    <?xml version="1.0" encoding="UTF-8"?>
    <menu>
    <AcType Name="Savings">
    <SavingAcDetails AcName="Mr. MELROY BENT" AccountNo="4" ClearBalance="744.18" ProductID="SB" TotalBalance="744.18">
    <SavingMoreAcDetails AcStatus="OPERATIVE" AcType="NORMAL" FreezeCode="No Freeze" ModeOfOper="AnyOne Single Or Survivor"/>
    </SavingAcDetails>
    </AcType>
    <AcType Name="TermDeposit">
    <TDAcDetails AcName="Mr. BENT MELROY" AccountNo="1731" ProductID="TD">
    <TDMoreAcDetails AcStatus="OPERATIVE" AcType="NORMAL" FreezeCode="No Freeze" ModeOfOper="Either or Survivor"/>
    </TDAcDetails>
    <TDAcDetails AcName="Mr. BENT MELROY" AccountNo="2287" ProductID="TD">
    <TDMoreAcDetails AcStatus="NEW" AcType="NORMAL" FreezeCode="No Freeze" ModeOfOper="Self"/>
    </TDAcDetails>
    <TDAcDetails AcName="Mr. BENT MELROY" AccountNo="78" ProductID="TD">
    <TDMoreAcDetails AcStatus="OPERATIVE" AcType="NORMAL" FreezeCode="No Freeze" ModeOfOper="Self"/>
    </TDAcDetails>
    </AcType>
    </menu>
    Tried Alot Of Examples Online But In Vain....
    Need Help....
    Thanks In Advance....

    Please help me !!!! I have been stuck up with this issue for the past two days and I need to atleast figure out if this is possible or not in the first place.

  • Adobe Bridge - Export - Manual Scale - Image Size Option

    I would like to use Adobe Bridge to export a batch of images to a fixed height (e.g. 400px) where the width is dynamic. There are other software programs that would give me this option, but It would be wonderful if this "small feature" could somehow be added to adobe photoshop.
    Thank you,
    jjchinquist

    Hello 1.csuebele, thanks for the comment.
    I was surprised that this was in Photoshop and not in the Bridge, but that is ok.
    I was not allowed to leave the width blank, nor enter -1 or 0 for variable. I worked around it by using a width that was so large, it would never be used because the maximum height would be used. For example width: 9000, height: 400.
    Unfortunately in Photoshop scripts, there seem to be no method to override the image proportion so that I could force a thumbnail of 400 wide and 300 high.
    After all that though, here is the result, thank you. http://www.ots.at/jahresrueckblick/2013/

  • Cannot access null object reference in flex

    Hi All,
    Please provide me the solution ASAP....for the below error........
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
        at Components::References/communicationServicesPort_resultHandler()[C:\Documents and Settings\xp\Adobe Flash Builder 4 Plug-in\LawPadPDA\src\Components\actionscript\ReferenceAS.as:345]
        at Components::References/__communicationServicesPort_result()[C:\Documents and Settings\xp\Adobe Flash Builder 4 Plug-in\LawPadPDA\src\Components\References.mxml:40]
        at flash.events::EventDispatcher/dispatchEventFunction()
        at flash.events::EventDispatcher/dispatchEvent()
        at com.adobe.fiber.services.wrapper::AbstractServiceWrapper/http://www.adobe.com/2008/flex/model/internal::propagateEvents()[C:\depot\DataServices\bra nches\lcds_modeler101\frameworks\projects\fiber-swc\src\com\adobe\fiber\services\wrapper\A bstractServiceWrapper.as:200]
        at flash.events::EventDispatcher/dispatchEventFunction()
        at flash.events::EventDispatcher/dispatchEvent()
        at mx.rpc::AbstractService/dispatchEvent()[E:\dev\4.0.0\frameworks\projects\rpc\src\mx\rpc\A bstractService.as:333] 
        at mx.rpc.soap.mxml::WebService/dispatchEvent()[E:\dev\4.0.0\frameworks\projects\rpc\src\mx\ rpc\soap\mxml\WebService.as:267] 
        at mx.rpc::AbstractOperation/http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent()[E:\dev\4.0.0\frameworks\pro jects\rpc\src\mx\rpc\AbstractOperation.as:254] 
        at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::resultHandler()[E:\dev\4.0.0\frameworks\projec ts\rpc\src\mx\rpc\AbstractInvoker.as:318] 
        at mx.rpc::Responder/result()[E:\dev\4.0.0\frameworks\projects\rpc\src\mx\rpc\Responder.as:5 6] 
        at mx.rpc::AsyncRequest/acknowledge()[E:\dev\4.0.0\frameworks\projects\rpc\src\mx\rpc\AsyncR equest.as:84] 
        at DirectHTTPMessageResponder/completeHandler()[E:\dev\4.0.0\frameworks\projects\rpc\src\mx\ messaging\channels\DirectHTTPChannel.as:446] 
        at flash.events::EventDispatcher/dispatchEventFunction() 
        at flash.events::EventDispatcher/dispatchEvent() 
        at flash.net::URLLoader/onComplete() 
    private function communicationServicesPort_resultHandler(event:ResultEvent):void{
                str = new ArrayCollection();
                if (event.token.result as ArrayCollection) { // When result contains more than one string
                    str = event.token.result as ArrayCollection;
                    if(str.length <= 15){ 
                        if(str.length<15)
                            nextLabel.enabled =false ; //  Here i am getting error for not accessing nextlabel i.e id of next button
                        else {
                            nextLabel.enabled =true ;
                        referenceDG.dataProvider = str; //Here i am getting error
                else {// When result contains single string or validation message
                    str = new ArrayCollection([event.result]);
                    if(str[0] == "NULL"){
                        str[0]= "                              Sorry! No Search Results Found... Please do search again..........          ";
                        nextLabel.enabled = false;
                    referenceDG.dataProvider = str;

    Hi,
    Thanks for ur reply,,
    I have posted u with some more code snippets .....please provide me solution ASAP
    Reference.mxml
    <s:HGroup width="1003" height="45" gap="2">
                <mx:Image id="judgements" width="98" minHeight="10" click="this.createMenu('judgements',JudgementsXMLTag)" buttonMode="true"
                          maxHeight="350" maxWidth="250" height="41" source="assets/images/ReferencesImages/JudgementsImg.jpg" left="0"/>
       </s:HGroup>
    <mx:Canvas id="datagrid" width="100%" height="100%">
                    <mx:VBox width="100%" height="100%" paddingBottom="5" paddingLeft="1" paddingRight="0"
                             paddingTop="10" verticalScrollPolicy="off" horizontalScrollPolicy="off">
                        <mx:DataGrid id="referenceDG" itemClick="openFile(event)"     //datagrid
                                     width="100%" height="100%" showHeaders="false"
                                     alternatingItemColors="[#ffffff,#ffffff]">
                            <mx:columns>
                                <mx:DataGridColumn dataField="*" fontWeight="normal" visible="false"
                                                   direction="ltr" fontGridFitType="pixel" color="#000000"
                                                   fontSize="12" fontStyle="normal" fontFamily="Verdana"
                                                   wordWrap="true" resizable="false" width="14"/>
                                <mx:DataGridColumn dataField="*" fontWeight="normal" labelFunction="SplitFunc" 
                                                   direction="ltr" fontGridFitType="pixel" color="#000000"
                                                   fontSize="12" fontStyle="normal" fontFamily="Verdana"
                                                   wordWrap="true" resizable="false" width="14"/>
                            </mx:columns>
                        </mx:DataGrid>
                        <mx:HRule width="968"/>
                        <mx:HBox horizontalAlign="right" width="968">
                            <mx:LinkButton id="prevLabel" label="Prev" fontWeight="bold" enabled="{counter>1}" click="prv_clickHandler(event)" color="#FF8800"/>  //Previous button
                            <mx:LinkButton id="nextLabel" label="Next" fontWeight="bold" click="nxt_clickHandler(event)" color="#FF8800"/>
    //Next Button
                        </mx:HBox>
                    </mx:VBox>
    </mx:Canvas>
    private function createMenu(btnName:String,xmlTag:XML):void {   //On click of judgements image
                /*reader.htmlText="";*/
                menu = new ScrollableArrowMenu();
                menu = ScrollableArrowMenu.createMenu(null,xmlTag, false);
                menu.labelField="@label";
                menu.verticalScrollPolicy =  ScrollPolicy.OFF;
                menu.arrowScrollPolicy =  ScrollPolicy.AUTO;
                menu.maxHeight=350;
                menu.maxWidth=250;
                var pt:Point = new Point(0, 40);
                    menu.addEventListener(MenuEvent.ITEM_CLICK,JudgementsMenuBar_itemClickHandler); ///menu item click event listener
                    pt = judgements.localToGlobal(pt);
                menu.show(pt.x, pt.y);
    protected function JudgementsMenuBar_itemClickHandler(event:MenuEvent):void /// On dropdown menu item click
                //Alert.show("Data under process","No Data");
                searchTxt.text ="";
                searchFlag = false;
                judgementItemLabel = null;
                var judgementItemLabel:String = null;
                judgementItemLabel = event.item.@label;
                var judgementItemLabelSplit:String = null;
                var judgementItemLabelSplitArray:Array = new Array();
                judgementItemLabelSplitArray = judgementItemLabel.split(" ");
                judgemntItemLabelAfterSplit=judgementItemLabelSplitArray[0];
                judgementsTtlWndw = PopUpManager.createPopUp(this, JudgementMenubarClickPopup, true) as JudgementMenubarClickPopup;   /// opening a pop up.... once th user enters the I/P iam dispatching the event from popup
                judgementsTtlWndw.addEventListener(ReferenceJudgementsEvent.SEARCH_CLICK_EVENT,searchButt onClickPopUp); //event listener for dispatched event from popup
                judgementsTtlWndw.judgementMess.text = " Please Enter Furthur Keywords to be Searched with respect to " + event.item.@label;
                judgementsTtlWndw.judgementitemlabelSplitPopUp.text = judgemntItemLabelAfterSplit+"btn";
                PopUpManager.centerPopUp(judgementsTtlWndw);
    private function searchButtonClickPopUp( event:ReferenceJudgementsEvent ) : void
                judgementFileDownloadString = event.judgementUserIp;
                searchButtonClick();
    public function searchButtonClick():void {
                    RefTxtInput = StringUtils.stripTags(judgementFileDownloadString);
                    judgementFileDownloadString = null;
                    searchFlag = false;
                    counter = 1;
                    getSearchEngineForReferencePageResult.token = lawPadCommunicationServicesPort.getSearchEngineForReferencePage(RefTxtInput, 15, counter);
    /////////////LawPad Search//////////////////////////
            private function lawPadCommunicationServicesPort_resultHandler(event:ResultEvent):void{
                str = new ArrayCollection();
                if (event.token.result as ArrayCollection) { // When result contains more than one string
                    str = event.token.result as ArrayCollection;
                    if(str.length <= 15){ 
                        if(str.length<15)
                            nextLabel.enabled =false ;
                        else {
                            nextLabel.enabled =true ; //error at this point
                        referenceDG.dataProvider = str; //error at this point

  • How to accessing item renderers in action script??

    Hi
    I am working on itemrenderes in Flex!
    I have link button component as item renderer inside one of the data grid column, please find my piece as below!
    Now how do we make that item render invisible once we click on it!
    We need to make that link button invisible to the user!
    Let me know how to access like this!
    public function onClick():void {
                // we use our custom component as the template for the popup window
                var confirmWindow:TitleWindow = TitleWindow(PopUpManager.createPopUp(this, ConfirmationPopUp, true));
                // you will only need to take care of the yes response since you don't have to do anything
                // if the response was a no
                confirmWindow.addEventListener("selectedYes", function():void {  
                            //Alert.show("Can be Upgraded to an Alarm");
                            upGradeEventToAnAlarm();
                confirmWindow.addEventListener("selectedNo", function():void {         
            public function upGradeEventToAnAlarm():void
                eventRO = new RemoteObject();                  
                      eventRO.destination = "eventBrowser";
                      eventRO.upGradeEventToAlarm.addEventListener("result",getResultHandler);                 
                      eventRO.addEventListener("fault", getFaultHandler);
                      eventRO.upGradeEventToAlarm(eventsDataGrid.selectedItem.id);
            private function getResultHandler(event:ResultEvent):void
                      //eventsDataGrid.dataProvider.removeItemAt(eventsDataGrid.selectedIndex)
                      if(event.result == true)
                       Here I need to access the link button which is clicked and need to make invisible
    Alert.show("Successfully  Upgraded to an alarm");
                      else
                            Alert.show("Cannot be Upgraded to an alarm");  
                //Fault Handler.             
                private function getFaultHandler(event:FaultEvent):void 
                      Alert.show(event.fault.faultString, 'Error');
                ]]>
    </mx:Script>           
          <mx:TabNavigator x="24" y="25" width="95%" height="90%"
                styleName="MyTabNavigator" horizontalGap="-20"  backgroundColor="#e6e4e5">
                <mx:Canvas label="View" width="100%" height="100%" >
                      <mx:DataGrid id="eventsDataGrid" dataProvider="{myModel.eventsList}"
                             height="90%" width="98%" x="10" y="23" >
                      <mx:columns>
                      <!--  <mx:DataGridColumn  id="iconFlagID" headerText="IconFlag"
                                  dataField="iconFlag" visible="false"/>-->
                            <mx:DataGridColumn  headerText="EventID" dataField="id" visible="false"/>
                            <mx:DataGridColumn  headerText="Event Name" dataField="eventName"/>
                            <mx:DataGridColumn  id="catFieldId" headerText="Category"
                                  dataField="category"/>
                            <mx:DataGridColumn  headerText="AlarmName" dataField="alarmName"/>
                            <mx:DataGridColumn  headerText="Severity" dataField="severity"/>
                            <mx:DataGridColumn  headerText="Source" dataField="source"/>
                            <mx:DataGridColumn  headerText="Updated Time" dataField="updateTime"/>
                            <mx:DataGridColumn  headerText="Description" dataField="description"/>
                            <mx:DataGridColumn  id="upgradeLinkButtonId" 
                                  headerText="Upgrade To Alarm" dataField="iconFlag">                          
                            <mx:itemRenderer>
                            <mx:Component>
                    <mx:Box height="100%" width="100%">               
                    <mx:LinkButton id="eventsLinkButtonID" textDecoration="underline"
                                  icon="@Embed(source='assets/eventsBrowser/images[97]1.JPG')"
                                  click="outerDocument.onClick();" visible="{!data.iconFlag}"
                                  textAlign="center" includeInLayout="true">
                    </mx:LinkButton>                                       
                            </mx:Box>
                    </mx:Component>
                    </mx:itemRenderer>
                            </mx:DataGridColumn>
                      </mx:columns>    
                      </mx:DataGrid>
    Thanks in advance
    Aruna.S.N.

    Hi Prashant
    Thanks for your reply!
    But where my viewStack need to be declared??
    Is it inside dataGridColumn if so its giving error as comonent declaration is not allowed here!
    Tell me how to go about!
    Thanks in advance
    Aruna.S.N.

  • Report Size to fit Chart Size

    Using the dynamic width and dynamic height properties of a chart I will change the size of the chart dynamically.
    However, when exporting the chart to an image I want it to export at the chart size and not be restricted to the static size of the page.
    Any way to do this ?

    Hi St33ln,
    If I understand correctly, you want to make the size of report to fit the size of chart, so the chart can be fully displayed after export the report to an image. Based on my research, I find that PageSize property is a static value. The page size does not
    grow or shrink to accommodate the contents of the report body. If you want the report to appear on a single page, all the content within the report body must fit on the physical page.
    So in your scenario, I couldn’t find an appropriate method to make the report size automatically change to fit the chart size. This is by design. As a workaround, I suggest that you can change the size of report to an appropriate value based on the chart
    size you may select.
    Thank you for your understanding.
    Regards,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Line wrapping - JTextPane

    Hi,
    Does anyone know how to disable line wrapping in a JTextPane?
    Thanks,
    Michael

    there 2 ways of achieving it.
    1. Instead of adding the editorpane to the JScrollPane, add the JEditorPane to a JPanel(BorderLayout->CENTER) and then the JPanel to the JScrollPane. Then you can avoid the said problem
    2. JEditorPane ta= new JEditorPane(){
    public boolean getScrollableTracksViewportWidth(){
    return false;
    use this to create ur JEditorpane.
    But the problem here is that your JEditorpane width is dynamic depending on ur text size.
    so when you add it to the JScrollPane you will not c it fitting exactly into the scrollpane width.
    hope it helps.

  • Set Combobox value based on Datagrid selectedItem

    I have been searching the forums and google for some time now
    and I'm not sure how do this. I populate a datagrid from a
    httpservice call to a php script. The datagrid is displaying
    perfectly. I also populate two comboboxes from the same httpservice
    with specific values. When I select a row in the datagrid, I'd like
    the value of the combobox to change to that which corresponds to
    the value from the datagrid.
    I also have a few TextInput fields mixed in with the
    comboboxes and I'm able to set those to the
    datagridname.selectedItem.item. I would like to do the same for the
    comboboxes.
    The reason is so that I can edit users in a group within a
    database. The comboboxes are for the specific groups that are
    allowed to all users.
    Please let me know if any other information is necessary. I
    didn't think any of my current code would help with this question.
    Any examples would be great, I just couldn't find any....
    Thanks in advance for your time.
    Chris

    Tracy - I think I'm progressing, but I'm still running into
    problems. I've changed the httpservice to call an eventhandler,
    which in turn I use in the datagrid to populate it. I'm sure I
    might need to change something, but it is working.... Once I get it
    all working, I'll stop using lastResult and build event handlers,
    now that I'm starting to get a better grasp on it.
    I do get an error though, stating: "Data binding will not be
    able to detect changes to XMLList "user", need an XML instance."
    Also, I can't seem to get "trace" to work. I'm guessing it should
    be popping up a window? If I do an alert popup, it does show the
    data.
    [Bindable]private var myData:XMLList;
    private function test(oEvent:ResultEvent):void {
    myData = XMLList(oEvent.result);
    trace(myData.toXMLString());
    mx.controls.Alert.show(myData);
    <mx:HTTPService id="getUsers"
    url="https://server/flex/getusers.php" resultFormat="e4x"
    result="test(event)" useProxy="false" method="GET"/>
    <mx:DataGrid id="dgUserDetails" right="5"
    dataProvider="{myData.user}" height="315"
    click="onChangeUser(event)">
    <mx:columns>
    <mx:DataGridColumn headerText="Username"
    dataField="uname"/>
    <mx:DataGridColumn headerText="Group"
    dataField="team"/>
    <mx:DataGridColumn headerText="Status"
    dataField="status"/>
    <mx:DataGridColumn headerText="Last Login"
    dataField="llogin"/>
    <mx:DataGridColumn headerText="Count"
    dataField="lcount"/>
    </mx:columns>
    </mx:DataGrid>
    Now, onto the user editing fields. I'm still trying to figure
    out how to use this example you gave me. I understand the xmlUser
    var and I think I understand the xlGroups var. Not sure how it
    should work though. It looks as though xlGroups tries to get the
    group from allusers under the user name?
    [Bindable]private var _xlcGroups:XMLListCollection;
    private function onChangeUser(oEvent:Event):void {
    var xmlUser:XML = XML(dgUserDetails.selectedItem); //the
    Users dataProvider item
    var xlGroups:XMLList = xmlUser.allusers.group; //this
    depends on your xml structure
    _xlcGroups = new XMLListCollection(xlGroups)
    trace(_xlcGroups.toXMLString() ); //so you can see exactly
    what you have
    Let me try to give a better example of the XML.
    <allusers>
    <user>
    <uname>user1</uname>
    <level>6</level>
    <status>active</status>
    <team>alpha</team>
    <llogin>0000-00-00 00:00:00</llogin>
    <lcount>0</lcount>
    </user>
    <user>
    <uname>user2</uname>
    <level>6</level>
    <status>active</status>
    <team>alpha</team>
    <llogin>2007-03-26 11:31:53</llogin>
    <lcount>128</lcount>
    </user>
    <user>
    <uname>user3</uname>
    <level>1</level>
    <status>active</status>
    <team>bravo</team>
    <llogin>2006-02-17 20:08:23</llogin>
    <lcount>3</lcount>
    </user>
    <group>
    <teamname>alpha</teamname>
    <teamlead>user2</teamlead>
    <teamstatus>active</teamstatus>
    </group>
    <group>
    <teamname>bravo</teamname>
    <teamlead>user3</teamlead>
    <teamstatus>active</teamstatus>
    </group>
    <statusops>
    <status>active</status>
    </statusops>
    <statusops>
    <status>inactive</status>
    </statusops>
    </allusers>
    And here is a more detailed view of the user editing panel.
    Again, I always want the comboboxes to display the data returned
    from the httpservice call. But I want to change the value when the
    user is selected.
    <mx:Panel width="250" height="315" left="5"
    layout="absolute" title="User Details">
    <mx:HBox x="10" y="27" width="210">
    <mx:Label text="Username" width="65"/>
    <mx:TextInput id="adm_username" width="137"
    text="{dgUserDetails.selectedItem.uname}"/>
    </mx:HBox>
    <mx:HBox x="10" y="55" width="210">
    <mx:Label text="Group" width="65"/>
    <mx:ComboBox id="adm_usergroup" width="137"
    dataProvider="{getUsers.lastResult.allusers.group}"
    labelField="teamname"/>
    </mx:HBox>
    <mx:HBox x="10" y="83" width="210">
    <mx:Label text="Level" width="65"/>
    <mx:TextInput id="adm_level" width="137" maxChars="1"
    text="{dgUserDetails.selectedItem.level}"/>
    </mx:HBox>
    <mx:HBox x="10" y="111" width="210">
    <mx:Label text="Status" width="65"/>
    <mx:ComboBox id="adm_activestatus" width="137"
    dataProvider="{getUsers.lastResult.allusers.statusops}"
    labelField="status"/>
    </mx:HBox>
    <mx:HBox x="10" y="137" width="210">
    <mx:Label text="Password" width="65"/>
    <mx:TextInput id="adm_password" width="137" enabled="true"
    backgroundDisabledColor="#C0C0C0" displayAsPassword="true"
    change="adm_chkusr(adm_password)"/>
    </mx:HBox>
    <mx:HBox x="10" y="165" width="210">
    <mx:Label text="Confirm" width="65"/>
    <mx:TextInput id="adm_confirm" width="137" enabled="false"
    backgroundDisabledColor="#C0C0C0" displayAsPassword="true"
    change="adm_chkusr(adm_confirm)"/>
    </mx:HBox>
    <mx:HBox x="10" y="205" width="210">
    <mx:HBox width="50%">
    <mx:LinkButton id="adm_clruser" label="Clear"
    click="clearviewUser()"/>
    </mx:HBox>
    <mx:HBox width="50%">
    <mx:LinkButton id="adm_moduser" label="Modify User"
    enabled="false"/>
    </mx:HBox>
    </mx:HBox>
    <mx:HBox x="10" y="233" width="210">
    <mx:HBox width="50%">
    <mx:LinkButton id="adm_deluser" label="Delete User"
    enabled="false"/>
    </mx:HBox>
    <mx:HBox width="50%">
    <mx:LinkButton id="adm_adduser" label="Add User"
    enabled="false"/>
    </mx:HBox>
    </mx:HBox>
    </mx:Panel>
    Thanks again for your time. I look forward to your response
    as this is driving me crazy.
    Regards,
    Chris

Maybe you are looking for

  • Cycle Count Scheduling in 11.5.9

    Running a cycle count by period. Cycle count was established to start on 27-Aug-07. Created the Perform full cycle count (Report Set) which runs every month...however in September the auto schedule in the cycle count form has the next date as 24-Sep-

  • IMac Dual-display colour profiling on second LG monitor

    Hey guys, I just purchased a second screen for my imac to use dual display, im a graphic designer and really need the space. What is the easiest and best way of mirroring the colour setting of the iMac to my second screen without the use of 3rd party

  • Free TV show that I already have is downloading

    I'm a fan of damages and have purchased/downloaded the whole series. However this evening Episode is downloading again as a seperate item. If I delete it then restart itunes it downloads again. I just don't want to sync 2 identical episodes onto my o

  • Upgrading from Solaris 10 to 11.2

    We have couple of old machines T2000, 8 CPU, 4 threads/core.  Internal disk size 2x75GB,  4 NIC cards, 32GB of RAM.   3 actual NG zones giving any service and machine is 99% idle.  I had a brilliant idea of making one of these machines a Solaris 11.2

  • Running COBOL programs from java

    I am on a project at the moment where we want the client-server to be written in Java on Solaris Sparc UNIX machines. The thing is we want the server to start a COBOL program and the output from the COBOL program will be the reply to the client. Is t