Skip to main content



      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 11:04 Go to next message
Eclipse UserFriend
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 13:32] by Moderator

Re: How to implement close function for CTabItem [message #1771191 is a reply to message #1771160] Tue, 22 August 2017 14:13 Go to previous message
Eclipse UserFriend
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: Sun Aug 31 12:25:00 EDT 2025

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

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

Back to the top