Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » ctabfolder - close
ctabfolder - close [message #457645] Thu, 30 June 2005 09:27 Go to next message
Eclipse UserFriend
Originally posted by: mks.vinosoft.at

is there any possibility to set the function of the close-button of the
ctabfolder on my own?

thx matthias
Re: ctabfolder - close [message #457646 is a reply to message #457645] Thu, 30 June 2005 10:48 Go to previous messageGo to next message
Henrik Skovgaard is currently offline Henrik SkovgaardFriend
Messages: 84
Registered: July 2009
Member
> is there any possibility to set the function of the close-button of the
> ctabfolder on my own?

Yep, look at the CTabFolder2Listener close method.

Example:

tabFolder.addCTabFolder2Listener(new CTabFolder2Adapter() {
public void close(CTabFolderEvent evt) {
CTabFolder folder = (CTabFolder)evt.widget;
CTabItem closedTab = (CTabItem)evt.item;

System.out.println("Closing and disposing tab...");
closedTab.dispose();

//TODO: Check saved-state
//

if(folder.getItemCount()==1 && evt.doit) {
DefaultToolBar.getDoSearchItem().setEnabled(false);
}
}
});


/Henrik
Re: ctabfolder - close [message #457671 is a reply to message #457646] Fri, 01 July 2005 07:39 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mks.vinosoft.at

and what happens if i click the "x"?

i search the children of a ctabfolder if a special ctabitem exists,
after i close it with the "x" it still exist. so what happens with it?

matthias
Re: ctabfolder - close [message #457675 is a reply to message #457671] Fri, 01 July 2005 10:13 Go to previous message
Benjamin Pasero is currently offline Benjamin PaseroFriend
Messages: 337
Registered: July 2009
Senior Member
Matthias Schlögl wrote:
> and what happens if i click the "x"?
>
> i search the children of a ctabfolder if a special ctabitem exists,
> after i close it with the "x" it still exist. so what happens with it?

Dispose is called on the Item.

Ben

>
> matthias
Previous Topic:SWT GUI Builder
Next Topic:SWT Api Doc
Goto Forum:
  


Current Time: Fri Apr 26 22:38:41 GMT 2024

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

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

Back to the top