mirror of
https://github.com/ruby/ruby.git
synced 2025-08-23 13:04:13 +02:00

* ext/tk/lib/tkextlib/itcl : add [incr Tcl] support * ext/tk/lib/tkextlib/itk : add [incr Tk] support * ext/tk/lib/tkextlib/iwidgets : midway point of [incr Widgets] support * ext/tk/sample/tkextlib/iwidgets : very simple examples of [incr Widgets] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6602 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
20 lines
806 B
Ruby
20 lines
806 B
Ruby
#!/usr/bin/env ruby
|
|
require 'tk'
|
|
require 'tkextlib/iwidgets'
|
|
|
|
Tk::Iwidgets::Extbutton.new(:text=>'Bitmap example', :bitmap=>'info',
|
|
:background=>'bisque', :activeforeground=>'red',
|
|
:bitmapforeground=>'blue', :defaultring=>true,
|
|
:command=>proc{
|
|
puts "Bisque is beautiful"
|
|
}).pack(:expand=>true)
|
|
|
|
#img = TkPhotoImage.new(:file=>File.join(File.dirname(File.expand_path(__FILE__)), '../../../images/earthris.gif'))
|
|
img = TkPhotoImage.new(:file=>File.join(File.dirname(File.expand_path(__FILE__)), '../catalog_demo/images/clear.gif'))
|
|
|
|
Tk::Iwidgets::Extbutton.new(:text=>'Image example', :relief=>:ridge,
|
|
:image=>img, :imagepos=>:e, :font=>'9x15bold',
|
|
:activebackground=>'lightyellow',
|
|
:background=>'lightgreen').pack(:expand=>true)
|
|
|
|
Tk.mainloop
|