(TestGTK:97864): Gtk-CRITICAL **: void gtk_container_child_set_property(GtkContainer *, GtkWidget *, const gchar *, const GValue *): assertion `child->parent == GTK_WIDGET (container)' failed
控件添加完后迫卢,要手動(dòng)調(diào)用一下show().否則是顯示不出來的该溯。
需要先設(shè)置fixed layout在添加 帶container中,否則無效香府。
下面代碼位置不起作用允趟。
Entry e = new Entry();
global::Gtk.Fixed.FixedChild w4 = ((global::Gtk.Fixed.FixedChild)(this.fixed1[e]));
w4.X = 600;
w4.Y = 100;
this.fixed1.Add(e);
正確應(yīng)該:
Entry e = new Entry();
this.fixed1.Add(e);
global::Gtk.Fixed.FixedChild w4 = ((global::Gtk.Fixed.FixedChild)(this.fixed1[e]));
w4.X = 600;
w4.Y = 100;