blob: a5d623ae80006db087ca5f8a339676cc94392e33 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#!/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
|