From 4b90fcc22fba45704d6875ea657ff785416fcc89 Mon Sep 17 00:00:00 2001 From: nagai Date: Thu, 15 Jul 2004 01:18:57 +0000 Subject: * ext/tk/, ext/tcltklib/: bug fix * ext/tk/lib/tk.rb: better operation for SIGINT when processing callbacks. * ext/tk/lib/tk/msgcat.rb: ditto. * ext/tk/lib/tk/variable.rb: ditto. * ext/tk/lib/tk/timer.rb: ditto. * ext/tk/lib/tk/validation.rb: add Tk::ValidateConfigure.__def_validcmd() to define validatecommand methods easier * ext/tk/lib/tk.rb (_genobj_for_tkwidget): support autoload Tk ext classes * ext/tk/lib/tk/canvas.rb and so on: remove the parent widget type check for items (e.g. canvas items; depends on the class) to avoid some troubles on Tk extension widget class definition. * ext/tk/lib/tkextlib/: add Iwidget and TkTable extension support * ext/tk/sample/tkextlib/: add samples of Iwidget and TkTable git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@6630 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/tk/sample/tktree.rb | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'ext/tk/sample/tktree.rb') diff --git a/ext/tk/sample/tktree.rb b/ext/tk/sample/tktree.rb index 6379635a5..bcb94d360 100644 --- a/ext/tk/sample/tktree.rb +++ b/ext/tk/sample/tktree.rb @@ -18,8 +18,10 @@ class TkTree < TkCanvas args = [@path] if keys.kind_of?(Hash) font = keys.delete('itemfont') +# font = hash_kv(font) if font.kind_of?(Hash) keys['font'] = font if font - args.concat(hash_kv(keys)) +# args.concat(hash_kv(keys)) + args << keys end begin tk_call('::tktree::treecreate', *args) @@ -33,8 +35,10 @@ class TkTree < TkCanvas if keys.kind_of?(Hash) keys = _symbolkey2str(keys) font = keys.delete('itemfont') +# font = hash_kv(font) if font.kind_of?(Hash) keys['font'] = font if font - tk_call('::tktree::newitem', @path, itempath, *hash_kv(keys)) +# tk_call('::tktree::newitem', @path, itempath, *hash_kv(keys)) + tk_call('::tktree::newitem', @path, itempath, keys) else tk_call('::tktree::newitem', @path, itempath) end @@ -80,7 +84,7 @@ EOL } f = TkFrame.new.pack(:expand=>true, :fill=>:both) - tr2 = TkTree.new(f, :bg=>'black', :itemfont=>{:family=>'Times', :size=>14}, + tr2 = TkTree.new(f, :bg=>'black', #:itemfont=>{:family=>'Times', :size=>14}, :textcolor=>'red', :bd=>4, :relief=>:ridge, :selectbackground=>'darkBlue', :selectforeground=>'yellow', :selectborderwidth=>3, :linecolor=>'yellow') { -- cgit