Re: Notebook: Reorderable tabs, how does it work ?

Le Fri 05/09/2008 à 15:33 Lieven van der Heide à écrit:
> Hi,
> I can't say that I tried it out, but my guess would be that that child
> is the label you put on the tab button (ie. the thing you are going to
> drag in order to reorder the tabs).
> Greets,
> Lieven.

Thanks for the help.
I don't think it was the label, but instead the content of the tab. I
could finally find some example on the Internet:

The code looks like:

  def __init__(self):

    # Create a new notebook, place the position of the tabs
    self.notebook = gtk.Notebook()

    # Let's append a bunch of pages to the notebook
    for i in range(5):
	bufferf = "Append Frame %d" % (i+1)
	bufferl = "Page %d" % (i+1)

	frame = gtk.Frame(bufferf)
	frame.set_size_request(100, 75)

	label = gtk.Label(bufferf)

	label = gtk.Label(bufferl)
	self.notebook.append_page(frame, label)
	self.notebook.set_tab_reorderable(frame, True)

Thanks again.


Mildred Ki'Lya
╭───────── ──────────
│ Jabber, GoogleTalk: <mildred jabber fr>
│ Site: <>              GPG ID: 9A7D 2E2B
│ Fingerprint: 197C A7E6 645B 4299 6D37 684B 6F9D A8D6 9A7D 2E2B

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]