Thank you for the reply. 

In the mean time time, the way we got it to work was to insert unused 'dummy' 
containers as tabs, and then re-parent the desired control into those tabs upon 
a selection event. 

So as of swt ~4.6 code like this will work: 
https://bugs.eclipse.org/bugs/attachment.cgi?id=250471 

Thank you 

Leo Ufimtsev | Intern Software Engineer @ Eclipse Team 

----- Original Message -----

From: "Gergely Polonkai" <gerg...@polonkai.eu> 
To: "Leo Ufimtsev" <lufim...@redhat.com> 
Cc: "gtk-app" <gtk-app-devel-list@gnome.org> 
Sent: Monday, February 9, 2015 12:36:18 PM 
Subject: Re: GTK, can GtkNotebook have a single control and all tabs pointing 
to it? 



Hello, 

I'm afraid this is not possible to do it this way; you will have to create some 
kind of wrapper widget. I would go on with GtkStack, and for the tabs 
themselves you may take a look into GtkStackSwitcher's source code. 

Best, 
Gergely 
On 9 Feb 2015 14:43, "Leo Ufimtsev" < lufim...@redhat.com > wrote: 


Hello, 

I'm an SWT developer. We build SWT on top of GTK. 

In swt, some developers like to create a GtkNotebook (TabFolder) with many tabs 
but all pointing to the same control. (sigh, odd, I know...) 

The control is a viewer, and changing tabs changes the content of the viewer. 

However, in gtk I haven't been able to make this work. If I add the same child 
twice, it gives me warnings and errors: 
gtk_notebook_append_page (GTK_NOTEBOOK (notebook), child1, label1); 
gtk_notebook_append_page (GTK_NOTEBOOK (notebook), child1, label2); 

Warning: 
(gtk3_testing:17322): Gtk-WARNING **: Can't set a parent on widget which has a 
parent 


Theoretically speaking, can a GtkNotebook have tabs that all point to the same 
control? (and we just listen to tab-changing events)? Or is this impossible by 
principle of widget-hierarchy? 

Thank you 

Leo Ufimtsev | Intern Software Engineer @ Eclipse Team 

_______________________________________________ 
gtk-app-devel-list mailing list 
gtk-app-devel-list@gnome.org 
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list 




_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Reply via email to