1#!/usr/bin/env ruby 2require 'tk' 3require 'tkextlib/iwidgets' 4 5TkOption.add('*textBackground', 'white') 6 7sb = Tk::Iwidgets::Selectionbox.new.pack(:padx=>10, :pady=>10, 8 :fill=>:both, :expand=>true) 9 10sb.insert_items('end', *['Hello', 'Out There', 'World']) 11 12TkLabel.new(sb.child_site, 13 :text=>'Child Site is Here').pack(:fill=>:x, :padx=>10, :pady=>10) 14 15sb.insert_items(2, 'Cruel Cruel') 16 17sb.selection_set(1) 18 19Tk.mainloop 20