diff options
| author | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-07-15 01:18:57 +0000 |
|---|---|---|
| committer | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-07-15 01:18:57 +0000 |
| commit | 4b90fcc22fba45704d6875ea657ff785416fcc89 (patch) | |
| tree | 537e86474ae310bdbc357b331a580cd42583a745 /ext/tk/sample/tktree.rb | |
| parent | b2b23fb1cdb54d5a9141867947b2ca77bf3730a3 (diff) | |
| download | ruby-4b90fcc22fba45704d6875ea657ff785416fcc89.tar.gz ruby-4b90fcc22fba45704d6875ea657ff785416fcc89.tar.xz ruby-4b90fcc22fba45704d6875ea657ff785416fcc89.zip | |
* 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
Diffstat (limited to 'ext/tk/sample/tktree.rb')
| -rw-r--r-- | ext/tk/sample/tktree.rb | 10 |
1 files changed, 7 insertions, 3 deletions
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') { |
