Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

tk::notebook changing tab order

42 views
Skip to first unread message

daniel....@outlook.com

unread,
Sep 13, 2018, 3:23:07 PM9/13/18
to
Hi,

I've designed an application that used the tk::notebook. I'm creating different tab when a file is open and close these when the file is close. I would like to know if there is a way to move tab around (drag and drop or an option to change the tab order).

I've found with bdwidget::notebook that there is a move function. I would like to do the same thing with tk::notebook.

Thanks,
Daniel

Ralf Fassel

unread,
Sep 13, 2018, 3:47:17 PM9/13/18
to
* daniel....@outlook.com
If tk::notebook is a typo:
with ttk::notebook, there is

NAME
ttk::notebook - Multi-paned container widget

pathname insert pos subwindow options...
Inserts a pane at the specified position. pos is either
the string end, an integer index, or the name of a managed
subwindow. If subwindow is already managed by the
notebook, moves it to the specified position. See TAB
OPTIONS for the list of available options.

HTH
R'

Daniel

unread,
Sep 14, 2018, 6:20:57 AM9/14/18
to
Le jeudi 13 septembre 2018 15:47:17 UTC-4, Ralf Fassel a écrit :
> * Daniel
Sorry, yes I was talking about ttk::notebook (my mistake).

Thanks for pointing out the insert function, this is what I was looking for!

Is it possible to do a drag&drop behavior like tab in google chrome with the mouse? If someone have some code example, this would be great.
Message has been deleted

Rich

unread,
Sep 14, 2018, 8:14:36 AM9/14/18
to
Daniel <daniel....@outlook.com> wrote:
> Sorry, yes I was talking about ttk::notebook (my mistake).
>
> Thanks for pointing out the insert function, this is what I was
> looking for!
>
> Is it possible to do a drag&drop behavior like tab in google chrome
> with the mouse? If someone have some code example, this would be
> great.

Does anyone even try to find anything themselves anymore?

Searching the Wiki for "drag drop" returns 15 pages with titles
containing drag and drop. The fifth entry from the top is titled "Drag
and Drop Notebook Tabs". Opening that one shows it is an example of
drag drop notebook tabs for a ttk::notebook widget.

daniel....@outlook.com

unread,
Sep 14, 2018, 9:28:47 AM9/14/18
to
Thanks,

Sorry about being newbie, didn't know about the wiki as a good information search. It does exactly what I wanted. You don't know how many hours I've search google for that... I was searching, just not at the right place :)

Rich

unread,
Sep 14, 2018, 10:40:00 AM9/14/18
to
Then the way to avoid a "does anyone do anything for themselves"
response is to remember that "we can't read your mind over Usenet" and
instead point out, when asking, that "I've searched here, and here, and
there, and have come up empty".

We can't know where you've looked unless you tell us in some way. And
while it is just one request from your viewpoint, from our vantage
point it is yet one more in a long constant stream of questions that
could have been trivially answered with a bit of personal effort.

This is an excellent read on the subject:

How To Ask Questions The Smart Way
http://www.catb.org/esr/faqs/smart-questions.html
0 new messages