require 'phi' form = Phi::Form.new(:form1, 'formです') combobox = Phi::ComboBox.new(form, :combobox1) button = Phi::Button.new(form, :button1, 'OK') form.width = 350 form.height = 50 combobox.align = Phi::AL_CLIENT combobox.text = '' button.align = Phi::AL_RIGHT combobox.items.add('ほげ') combobox.items.add('ふが') combobox.items.add('にゅう') button.on_click = proc do print combobox.text, "\r\n" end form.show Phi.mainloop