From: "Fred L." Date: 2012-07-10T05:30:16+09:00 Subject: how to create a CText Tk widget ? Hello all, I know those two nice websites for informations on Ruby/Tk, but they are not complete and it's really difficult to find documentation or samples for Tk widgets on Ruby : http://www.tutorialspoint.com/ruby/ruby_tk_guide.htm http://www.tkdocs.com/ I want to try the CText widget, wich is part of tcllib package, but can't find how to do it. here is my last try from a Text sample I modified : require 'tk' require 'tkextlib/tcllib/ctext' root = TkRoot.new do title "Window" minsize(320,200) end ctext = Tk::Tcllib::CText.new(root) do borderwidth 1 font TkFont.new('arial 11 bold') pack('fill' => 'both', 'expand'=>true) end ctext.insert 'end', "test (hello)" Tk.mainloop and here is the error I got : C:/Ruby193/lib/ruby/1.9.1/tk/package.rb:86:in `rescue in require': TkPackage can't find package ctext (RuntimeError) from C:/Ruby193/lib/ruby/1.9.1/tk/package.rb:83:in `require' from C:/Ruby193/lib/ruby/1.9.1/tkextlib/tcllib/ctext.rb:14:in `' from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require' from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require' from tk_test7.rbw:2:in `
' forgot to mention, I'm on WindowsXP with the last version of RubyInstaller (with Tk included) and devkit.. so, can someone give me a little help to start with CText or simply point me to ruby Tk samples, different from the common ones...? thanks. Fred -- Posted via http://www.ruby-forum.com/.