Skip to main content

Add action listener to a container

Please note these forums are being decommissioned and use the new and improved forums at
1 reply [Last post]
Joined: 2010-10-29

I want to create a specific button which has two part of text, left and right..
So I need to use Grid layout (new GridLayout(1,2) )
But because I can't do it in a button , I created my own component which extends Container and set its layout to grid and set it Focusable as well.
For now everthing were as expected... but the problem it's not responding to any event because i can't set action listener !!
is any way to apply that?

Thank you

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2003-11-07

If you are using SVN you can use LeadComponent:
Otherwise you need to define the parent as focusable and remove focusability from the child, then handle all events on your own. Its relatively easy to implement though.