Reputation: 5
I want to add a listener on my shells 'maximize' button such that an event is triggered when the user clicks on it. In this case, I want to re-size my table columns whenever the user chooses to maximize the shell. Is there any way to do this?
Upvotes: 0
Views: 662
Reputation: 111142
You can add a SWT.Resize
listener to be told about all shell size changes:
shell.addListener(SWT.Resize, new Listener()
{
@Override
public void handleEvent(final Event event)
{
}
});
Note: If you are using the JFace TableViewer
then TableColumnLayout
will do the column resize automatically.
Upvotes: 0