Thanks Shai,
However, I realiased that the plugged event applied to the label and not
the textfield in the TextComponent.
I need to attach this event to the TextField and not the label.
Please assist nudge me to right direction.
TextComponent partNo=new TextComponent().label("Part No.");
partNo.getField().addActionListener((e) ->{
//validate the Part No for the car.
});
On Thursday, August 16, 2018 at 5:10:23 PM UTC+1, Muchey wrote:
>
> Am excited about the TextComponent, however, I have this challenge.
>
> I am trying to attach an action event to the textfield in the
> textcomponent added uisng the line below, but I realise the TextComponent
> is a component, an receives other events except for the action event. This
> is just a container.
>
> How do I capture the TEXTFIELD attached to the textcompnent to write in an
> actionEvent on it? I dont find using the getComponentAt() function quite
> friendly for this.
>
> Any help/link greatly appreciated urgently.
>
--
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/da95657d-f251-47cb-a248-5c6e50f3727e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.