Sha256: a7db527d1aeb1efdcaf96bdaf856a09acbe815cd71c89347186cad4830d9f829

Contents?: true

Size: 524 Bytes

Versions: 2

Compression:

Stored size: 524 Bytes

Contents

#!/usr/bin/env ruby

require 'rubygems'
require "newt"

begin

  Newt::Screen.new

  b1 = Newt::Button.new(-1, -1, "Button1")
  b2 = Newt::Button.new(-1, -1, "Button2")

  b = Newt::Button.new(-1, -1, "Exit")

  grid = Newt::Grid.new(2, 0)
  grid.setField(0, 0, Newt::GRID_COMPONENT, b1, 0, 0, 0, 0, 0, 0)
  grid.setField(0, 1, Newt::GRID_COMPONENT, b2, 0, 0, 0, 0, 0, 0)
  grid.setField(1, 0, Newt::GRID_COMPONENT, b, 0, 0, 0, 0, 0, 0)
  
  f = Newt::Form.new
  f.add(b1, b2, b)
  f.run()

ensure
  Newt::Screen.finish
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
newt-0.9.7 examples/test_method/Grid_new.rb
newt-0.9.2 examples/test_method/Grid_new.rb