require 'phi' form = Phi::Form.new(:form1, 'form‚Ĺ‚·') button = Phi::SpeedButton.new(form, :button1, 'hoge') button.flat = true button.allow_all_up = true button.group_index = 1 button.on_click = proc do if button.down? button.caption = '1' else button.caption = '2' end end form.show Phi.mainloop