Hi Ganesh

If TextInput text is not displayed then use [Bindable] for the function.

I think the function is not bindable.

I hope it works

Regards
Gagan

2008/11/18 Ganesh <[EMAIL PROTECTED]>

>
> Hi Sathish
>
> thanks for the code.
>
>  Im trying to get age of given person date of birth year.   for
> example person x date of birth is 1980 know his age is 28
> here is the sample function . this is not working. actually i want to
> use date control to choose the date of birth then display in text
> box.
>
> <?xml version="1.0" encoding="utf-8"?>
> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";
> layout="vertical" >
>    <mx:Script>
>        <![CDATA[
>
>            import mx.controls.Alert;
>            import mx.rpc.events.FaultEvent;
>            import mx.rpc.events.ResultEvent;
>
>
>
> private function getYearsOld(dob:Date):uint {
> var now:Date = new Date();
> var yearsOld:uint = Number(now.fullYear) - Number(dob.fullYear);
> if (dob.month >= now.month && dob.date >= now.date) {
> yearsOld--;
> }
> return yearsOld;
> }
>        ]]>
>    </mx:Script>
> <mx:TextInput x="22" y="292" id="selecteduserid" text="{getYearsOld
> ()}"/>
> </mx:Application>
>
>
>
> On Nov 18, 11:37 am, "Satish பேர கேட்டா சும்மா அதுருதில"
>  <[EMAIL PROTECTED]> wrote:
> > Hi ganesh,
> >
> > Here is the sample application. Hope it helps you.
> >
> > <?xml version="1.0"?>
> > <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";
> > initialize="init()" >
> >     <mx:CheckBox id="check1" label="Select" click="checkSelection()"/>
> >     <mx:ComboBox id="combo1" />
> >     <mx:TextInput text="Sample" id="text1"/>
> > <mx:Script>
> >     <![CDATA[
> >         public function init():void
> >         {
> >             var    arr1:Array=new Array();
> >             arr1.push("abc");
> >             arr1.push("def");
> >             arr1.push("ghi");
> >             combo1.dataProvider=arr1;
> >         }
> >          public function checkSelection():void
> >          {
> >
> >              if(check1.selected==true)
> >             {
> >             combo1.visible=false
> >             text1.visible=false
> >             }
> >              else
> >              {
> >             combo1.visible=true
> >             text1.visible=true
> >              }
> >          }
> >
> >     ]]>
> > </mx:Script>
> > </mx:Application>
> >
> >
> >
>  > On Tue, Nov 18, 2008 at 11:29 AM, Ganesh <[EMAIL PROTECTED]> wrote:
> >
> > > Hi Sathish
> >
> > > thanks for your reply .
> >
> > > in my application i have one check box "spouse info" if you select
> > > this
> >
> > > spouse info fields(text input fields,combo box,datefield) in the same
> > > page
> >
> > > and other pages(panels) related to spouse info fields should hide or
> > > display
> >
> > > do you have any samples.
> >
> > > regards
> > > ganesh
> >
> > > On Nov 17, 10:54 pm, "Satish பேர கேட்டா சும்மா அதுருதில"
> > > <[EMAIL PROTECTED]> wrote:
> > > > Hi
> > > > what do u mean by fields? is it a text fields or some container
> sort.. If
> > > in
> > > > case of container or panel it has a property called "visible". On
> > > selection
> > > > of an check box set the visible property as false. Deselecting it
> again
> > > will
> > > > set the visible property to true..
> >
> > > > Cheers
> > > > Satish
> >
> > > > On Mon, Nov 17, 2008 at 10:05 PM, Ganesh r <[EMAIL PROTECTED]> wrote:
> > > > > Hi All
> >
> > > > > I Want show some fields(default hide) based on check box selection
> in
> > > the
> > > > > same page and other panels.
> > > > >  how to do that.is there any samples
> >
> > > > > thanks
> > > > > regards
> > > > > ganesh- Hide quoted text -
> >
> > > > - Show quoted text -- Hide quoted text -
>  >
> > - Show quoted text -
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Flex 
India Community" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/flex_india?hl=en
-~----------~----~----~----~------~----~------~--~---

  • ... Ganesh r
    • ... Satish பேர கேட்டா சும்மா அதுருதில
      • ... Ganesh
        • ... Satish பேர கேட்டா சும்மா அதுருதில
          • ... Ganesh
            • ... GAGAN anand

Reply via email to