Add "New Tab" button to the tabsheet

Hi guys!
Is there a way to add a custom button that will be shown in the tabsheet header?
For example a “new tab” button, as in browser applications.
11440.png

You could fake it with AbsoluteLayout. Position a button on top of a tabsheet.

There is already an enhancement request for implementing this cleanly (I found
ticket 5034
), but it is currently not scheduled for any particular release.

I solved this by just adding a tab with no content and no caption, but only an icon (with the ‘plus’-sign) and then adding a tabchangelistener to the tabsheet.

When the ‘add’-tab is selected:

  • remove the ‘add’-tab
  • add a new tab
  • add the removed ‘add’ tab again

Thank you for a reply.
But there is a problem with this solution. When you close other open tab this one may be selected causing trigerring this method.

Sorry! This worked for me!
Just made tab not closable if only one is open. And keeping plus tab last in list.

Thanks for the idea but I’m not sure why you’re removing the add tab when you can just leave the add tab and just add the new tab in a position before the add tab, Although it’s entirely possible that the position parameter wasn’t available 3 years ago :slight_smile: