From: Hidetoshi NAGAI Date: 2008-11-27T12:42:59+09:00 Subject: Re: BLT::Tabnotebook - tabnotebook.tcl not found From: Philip Müller 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 = Tk::BLT::Tabnotebook.new(TkRoot.new).pack > > > > t1 = 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 = Tk::BLT::Tabnotebook.new(TkRoot.new).pack t1 = Tk::BLT::Tabnotebook::Tab.new(nb) t1.window = Tk::BLT::Tile::Label.new(nb) ------------------------------------------------ And, the following will work, too. ------------------------------------------------ nb = Tk::BLT::Tabnotebook.new(TkRoot.new).pack t1 = nb.insert(:end, :text=>'LABEL1', :window=>Tk::BLT::Tile::Label.new(nb, :text=>'fooooo')) t2 = nb.insert(:end, :text=>'LABEL2', :window=>Tk::BLT::Tile::Label.new(nb, :text=>'baaaaa')) ------------------------------------------------ -- Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)