Jewel textinput disable or readonly at runtime

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Jewel textinput disable or readonly at runtime

choirul anam
How to set a jewel text input disable / readonly at runtime ?

Regards,
Choirul



--
Sent from: http://apache-royale-users.20374.n8.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: Jewel textinput disable or readonly at runtime

Piotr Zarzycki
Hi Choirul,

Yes you can. It is enough if you add bead [1] and start manipulate property "disabled" - true/false.


Thanks,
Piotr

On Fri, May 3, 2019, 4:40 AM choirul anam <[hidden email]> wrote:
How to set a jewel text input disable / readonly at runtime ?

Regards,
Choirul



--
Sent from: http://apache-royale-users.20374.n8.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: Jewel textinput disable or readonly at runtime

choirul anam
I am trying to do with :

<j:TextInput id="txtCode">
            <j:beads>
                <j:TextPrompt  prompt="Project Code" id="promptCode" />
                <j:StringValidator required="5" autoTrim="false"
requiredFieldError="Need more than 5 characters"/>                                
                <j:Disabled/>                                
            </j:beads>
        </j:TextInput>


and when some button click :

private function btnAdd_click(event:MouseEvent):void
{
        txtCode.beads[2]=false;
}

Why that code is not working? How to set up ?




--
Sent from: http://apache-royale-users.20374.n8.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: Jewel textinput disable or readonly at runtime

Piotr Zarzycki
Like I said to you - Use property which is inside bead. Property is being called "disabled" - Do you see it? 

I recommend you as well to use some additional Bindable property instead reach bead trough array beads - It's definitely not recommended. 

[Bindable]
private var myProperty:Boolean;

<Disabled disabled={myProerty} /> 

Thanks,
Piotr

On Fri, May 3, 2019, 9:43 AM choirul anam <[hidden email]> wrote:
I am trying to do with :

<j:TextInput id="txtCode">
            <j:beads>
                <j:TextPrompt  prompt="Project Code" id="promptCode" />
                <j:StringValidator required="5" autoTrim="false"
requiredFieldError="Need more than 5 characters"/>                               
                <j:Disabled/>                               
            </j:beads>
        </j:TextInput>


and when some button click :

private function btnAdd_click(event:MouseEvent):void                   
{       
        txtCode.beads[2]=false;
}

Why that code is not working? How to set up ?




--
Sent from: http://apache-royale-users.20374.n8.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: Jewel textinput disable or readonly at runtime

Carlos Rovira-2
Hi Choirul
could you post this question in stackoverflow with "apache-royale" tag? 
This will help us to spread the word about Apache Royale and help more people answering
thanks!

El vie., 3 may. 2019 a las 10:04, Piotr Zarzycki (<[hidden email]>) escribió:
Like I said to you - Use property which is inside bead. Property is being called "disabled" - Do you see it? 

I recommend you as well to use some additional Bindable property instead reach bead trough array beads - It's definitely not recommended. 

[Bindable]
private var myProperty:Boolean;

<Disabled disabled={myProerty} /> 

Thanks,
Piotr

On Fri, May 3, 2019, 9:43 AM choirul anam <[hidden email]> wrote:
I am trying to do with :

<j:TextInput id="txtCode">
            <j:beads>
                <j:TextPrompt  prompt="Project Code" id="promptCode" />
                <j:StringValidator required="5" autoTrim="false"
requiredFieldError="Need more than 5 characters"/>                               
                <j:Disabled/>                               
            </j:beads>
        </j:TextInput>


and when some button click :

private function btnAdd_click(event:MouseEvent):void                   
{       
        txtCode.beads[2]=false;
}

Why that code is not working? How to set up ?




--
Sent from: http://apache-royale-users.20374.n8.nabble.com/


--
Reply | Threaded
Open this post in threaded view
|

Re: Jewel textinput disable or readonly at runtime

choirul anam
Reply | Threaded
Open this post in threaded view
|

Re: Jewel textinput disable or readonly at runtime

choirul anam
In reply to this post by Piotr Zarzycki
Piotr,
Its worked

Thanks a lot



--
Sent from: http://apache-royale-users.20374.n8.nabble.com/