FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

gtkD.Notebook with shared instance

 
Post new topic   Reply to topic     Forum Index -> gtkD
View previous topic :: View next topic  
Author Message
mwarning



Joined: 01 Apr 2007
Posts: 56

PostPosted: Wed Mar 05, 2008 9:12 pm    Post subject: gtkD.Notebook with shared instance Reply with quote

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
View user's profile Send private message
kaarna



Joined: 03 Apr 2006
Posts: 92
Location: Finland

PostPosted: Thu Mar 06, 2008 9:59 am    Post subject: Reply with quote

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
View user's profile Send private message AIM Address MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> gtkD All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group