root / trunk / samples / dialogs.rb

Revision 213, 472 bytes (checked in by why, 10 months ago)

* shoes/ruby.c: adding a span inline, which does just like HTML, for applying adhoc styles.
* samples/: updating some samples with the new methods, still needs lots of work obviously.

Line 
1Shoes.app :width => 300, :height => 150, :margin => 10 do
2  def answer(v)
3    @answer.replace v.inspect
4  end
5
6  button "Ask" do
7    answer ask("What is your name?")
8  end
9  button "Confirm" do
10    answer confirm("Would you like to proceed?")
11  end
12  button "Open File..." do
13    answer ask_open_file
14  end
15  button "Save File..." do
16    answer ask_save_file
17  end
18  button "Color" do
19    answer ask_color("Pick a Color")
20  end
21
22  @answer = para "Answers appear here"
23end
Note: See TracBrowser for help on using the browser.