From: Philip M=FCller <me / alienemperor.de> Subject: Re: BLT::Tabnotebook - tabnotebook.tcl not found Date: Thu, 27 Nov 2008 06:39:32 +0900 Message-ID: <9827e8810cfd28d90e4025f4d4275b94 / ruby-forum.com> > We can now create tabs. However, when we try to insert elements into = the = > tabs, we still get errors. > = > E.g.: > = > > require 'tk' > > require 'tkextlib/blt' > > = > > nb =3D Tk::BLT::Tabnotebook.new(TkRoot.new).pack > > = > > t1 =3D Tk::BLT::Tabnotebook::Tab.new(nb) > > Tk::BLT::Tile::Label.new(t1) A Tab object cannot be a parent of other widet. Please use a Tabnotebook object as a parent of contents. For example, the following will work. ------------------------------------------------ require 'tk' require 'tkextlib/blt' nb =3D Tk::BLT::Tabnotebook.new(TkRoot.new).pack t1 =3D Tk::BLT::Tabnotebook::Tab.new(nb) t1.window =3D Tk::BLT::Tile::Label.new(nb) ------------------------------------------------ And, the following will work, too. ------------------------------------------------ nb =3D Tk::BLT::Tabnotebook.new(TkRoot.new).pack t1 =3D nb.insert(:end, :text=3D>'LABEL1', = :window=3D>Tk::BLT::Tile::Label.new(nb, :text=3D>'fooooo= ')) t2 =3D nb.insert(:end, :text=3D>'LABEL2', = :window=3D>Tk::BLT::Tile::Label.new(nb, :text=3D>'baaaaa= ')) ------------------------------------------------ -- = Hidetoshi NAGAI (nagai / ai.kyutech.ac.jp)