Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » How to implement close function for CTabItem(Need to pop up window to give user choice to close or cancel)
How to implement close function for CTabItem [message #1771160] Tue, 22 August 2017 15:04 Go to next message
Gary Shi is currently offline Gary ShiFriend
Messages: 21
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 17:32]

Report message to a moderator

Re: How to implement close function for CTabItem [message #1771191 is a reply to message #1771160] Tue, 22 August 2017 18:13 Go to previous message
Gary Shi is currently offline Gary ShiFriend
Messages: 21
Registered: July 2013
Junior Member
this one is duplicate. Please remove it if you can. Thanks
Previous Topic:How to access view page data/object from CTabFolder event
Next Topic:How to make bottom of composite new "zero" point for GUI
Goto Forum:
  


Current Time: Thu Dec 14 10:24:02 GMT 2017

Powered by FUDForum. Page generated in 0.01449 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software