How to implement close function for CTabItem [message #1771164] |
Tue, 22 August 2017 15:19 |
Gary Shi Messages: 20 Registered: July 2013 |
Junior Member |
|
|
I have one stand alone Java SWT application and CTabFolder and CTabItem items were used. When user try to close one CTabItem by click on "X" icon beside CTabItem title, I want to pop up one window and give user option to cancel this action or continue to close it. I implement this function by adding below code, but we can't cancel this action and only can do some thing before it close. How to cancel this "close action", user select cancel in pop up window. Thanks. Gary
folder.addCTabFolder2Listener(new CTabFolder2Adapter() {
@Override
public void close (CTabFolderEvent event) {
System.out.println(" Open popup window, and do some thing");
System.out.println("can not cancel this action ? ");
}
}
[Updated on: Tue, 22 August 2017 21:12] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.02226 seconds