Sha256: bbfab71f5733c2aabd6aa865e514c088447292e17025d492ee348f2ae596c2ed

Contents?: true

Size: 938 Bytes

Versions: 1

Compression:

Stored size: 938 Bytes

Contents

# frozen_string_literal: true
Shoes.app width: 320, height: 420 do
  static_dir = File.expand_path(File.join(__FILE__, ".."))
  background File.join(static_dir, "menu-gray.png")
  image File.join(static_dir, "menu-top.png"), height: 50
  image File.join(static_dir, "menu-left.png"), top: 50, width: 55
  image File.join(static_dir, "menu-right.png"), right: 0, top: 50, width: 55
  image File.join(static_dir, "menu-corner1.png"), top: 0, left: 0
  image File.join(static_dir, "menu-corner2.png"), right: 0, top: 0

  stack margin: 40 do
    stack margin: 10 do
      para "Name"
      @name = list_box items: ["Phyllis", "Ronald", "Wyatt"]
    end
    stack margin: 10 do
      para "Address"
      @address = edit_line
    end
    stack margin: 10 do
      para "Phone"
      @phone = edit_line
    end
    stack margin: 10 do
      button "Save" do
        Shoes.p [@name.text, @address.text, @phone.text]
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
shoes-4.0.0.pre12 samples/simple_form.rb