Version 3 of ttk:notebook help

Updated 2011-03-18 00:33:03 by RLE

Can anybody tell me how to delete the tabs created by ttk:notebook? I can create as many as tabs I want, however, I do not know how to delete/close it, and I'd like to run some command when closing it for example, saving files. Thanks for your help.

RLE (2011-03-17): man n ttk_notebook:

 pathname forget tabid
   Removes the tab specified by tabid, unmaps and unmanages the
   associated window.

Looking in the documentation as a first step is always a good idea.

hshang - 2011-03-17 18:19:48

thanks. Guess my question is not clear. I want to have a "X" button by tab label, like the tab frame in a terminal; so that it tab can be closed when "X" button is clicked. However, I could not find a way to add the button.

RLE - (2011-03-17): Take a look at the ttk::notebook page, in the section on "Tab list scrolling". It is not directly what you ask for, but it is going in the same direction and you might be able to derive some help from how that works.