Re: How to change particular tab child of a GtkNotebook



Why not make the tab's child a GtkContainer, then change the contents of the container with remove()/add()?


On 01/30/2018 10:17 AM, pspgen mail bg wrote:


I am making a text editor in GTK, whereas each new file is loaded into a
new tab.


I don't want to create and initialize the same content (which happens to be
huge) over again on all tabs (especially since only a GtkTextBuffer is to
be different), so I decided to use gtk_notebook_detach_tab() to detach
child of the initial tab and use it for the next tab. However, detaching a
child appears to be destroying the entire tab. To solve this I think I must
first set some other valid stub child to it, but I don't see any way to do
this, as the only place you are allowed to add a child to a tab is upon
creation of the tab itself, being with gtk_notebook_append_page() or
gtk_notebook_ibsert_page().


How do I change / set tab's child?




-------------------------------------

П.П. Избра ли вече име за твоя сайт? Хайде, пазим място за него!Ела на www.superhosting.bg и вземи с до –50% 
отстъпка!
  
https://www.superhosting.bg/promo/webhosting?utm_source=mail.bg&utm_medium=footer&utm_content=v3&utm_campaign=winter_promo17
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

--
”Wait, what if these quote marks are inside out, so everything in the rest of the document is the quotation and /this/ part isn't? Duuuuude.“
   — Randall Munroe


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