View previous topic :: View next topic |
Author |
Message |
mwarning
Joined: 01 Apr 2007 Posts: 56
|
Posted: Wed Mar 05, 2008 9:12 pm Post subject: gtkD.Notebook with shared instance |
|
|
I try to create a Notebook with each page represented by the same widget instance.
Code: | auto nb = new Notebook;
nb.appendPage(some_widget, new Label("Page 1"));
nb.appendPage(some_widget, new Label("Page 2")); |
The problem is that after the first appendPage I get
Code: | (main:30105): Gtk-WARNING **: Can't set a parent on widget which has a parent |
since some_widget get multiple parent in this case.
Is there a workaround for this? |
|
Back to top |
|
|
kaarna
Joined: 03 Apr 2006 Posts: 92 Location: Finland
|
Posted: Thu Mar 06, 2008 9:59 am Post subject: |
|
|
It's a limitation of GTK+. In GTK+ you can't have the same widget in multiple containers. You must create a new one for each container. As far as I know. |
|
Back to top |
|
|
|