Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > media > main > by-pkgid > e2a5fef11a7f55d2dc803b8b7498c8e5 > files > 691

ruby-tcltk-1.8.5-31.el5_9.x86_64.rpm

#!/usr/bin/env ruby
require 'tk'
require 'tkextlib/iwidgets'

TkOption.add('*textBackground', 'white')

sb = Tk::Iwidgets::Selectionbox.new.pack(:padx=>10, :pady=>10, 
                                         :fill=>:both, :expand=>true)

sb.insert_items('end', *['Hello', 'Out There', 'World'])

TkLabel.new(sb.child_site, 
            :text=>'Child Site is Here').pack(:fill=>:x, :padx=>10, :pady=>10)

sb.insert_items(2, 'Cruel Cruel')

sb.selection_set(1)

Tk.mainloop