This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'thread' | |
| Shoes.app do | |
| @s = stack do | |
| para "this is a para in the stack.." | |
| end | |
| Thread.new do | |
| sleep 0.1 | |
| @s.remove |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Shoes.app :width => 500 do | |
| @s1 = stack :margin_left => 50, :height => 1.0 do | |
| background red | |
| para "a b c d e f g h i l m n o p q r s t u v a b c d e f g h 1 2 3 4" | |
| button "show" do | |
| @s1.style(:width => -150) | |
| @s2.show | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Shoes::MyWidget < Shoes::Widget | |
| def initialize | |
| background blue | |
| para "this is MyWidget" | |
| end | |
| def addpara p | |
| para strong(p) | |
| p self # this always prints (Shoes::MyWidget) | |
| end |
NewerOlder