Am here again.

This code snippet brought me back.
A mouse click on the label executes the actionEvent, however several clicks 
on the textfield does nothing.

I need the event in the code below to execute on click of the textfield.
Please patiently review the code and assist detect where am wrong.
You might run the lines below and detect on which component the actionEvent 
executes.

This is seen in the label and not the textfield click event.

Once this is out of the way, I will use the Validator class you introduced 
to me, to validate data input in the textfield.

TextComponent loadMe=new TextComponent().text("A20145235")
                             .hint("A20145235")
                             .label("Part No.")
                             .multiline(false);

        loadMe.getField().addActionListener((e) ->{
            execute("www.google.com");
        });


On Monday, August 20, 2018 at 1:20:06 PM UTC+1, Muchey wrote:
>
> Am here again.
>
> This code snippet brought me back.
> A mouse lick on the label executes the actionEvent, however several clicks 
> on the textfield does nothing.
>
> I need the event in the code below to execute on click of the textfield.
> Please patiently review the code and assist detect where am wrong.
>
> Once this is out of the way, I will use the Validator class you introduced 
> to me, to validate data input in the textfield.
>
> TextComponent loadMe=new TextComponent().text("A20145235")
>                              .hint("A20145235")
>                              .label("Part No.")
>                              .multiline(false);
>
>         loadMe.getField().addActionListener((e) ->{
>             execute("www.google.com");
>         });
>

Million thanks. 

>
> On Saturday, August 18, 2018 at 6:13:34 AM UTC+1, Shai Almog wrote:
>>
>> No this applies to the text field not the label part. 
>> Notice that you can also use the validation framework to validate the 
>> text field. See the validator code here: 
>> https://www.codenameone.com/blog/pixel-perfect-text-input-part-2.html
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/codenameone-discussions/b7ec6493-c259-4527-97ad-b270ae1ef36c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to