require 'phi'

form = Phi::Form.new(:form1, 'form‚Ĺ‚·')
edit = Phi::Edit.new(form, :edit1)
button = Phi::Button.new(form, :button1, 'OK')

form.width = 350
form.height = 50
edit.align = Phi::AL_CLIENT
edit.text = ''
button.align = Phi::AL_RIGHT

button.on_click = proc do
  print edit.text, "\r\n"
end

form.show
Phi.mainloop
