Sha256: 00ab0904fadfcbeb3fab95e01b646927b730c6af907155ed4e9251e0adc1a37f

Contents?: true

Size: 330 Bytes

Versions: 2

Compression:

Stored size: 330 Bytes

Contents

#!/usr/bin/env ruby

require 'rubygems'
require "newt"

begin

  Newt::Screen.new

  l1 = Newt::Listbox.new(1, 1, 10, Newt::FLAG_SCROLL)
  1.upto(20) do |i|
	l1.append("item #{i}", i)
  end
  l1.set_width(20)

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

  f = Newt::Form.new
  f.add(l1, 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/Listbox_set_width.rb
newt-0.9.2 examples/test_method/Listbox_set_width.rb