Sha256: fbd02b9527e56712001aabb20d248db82ad319a94d7f1284e5a0102361688e1a

Contents?: true

Size: 339 Bytes

Versions: 2

Compression:

Stored size: 339 Bytes

Contents

#!/usr/bin/env ruby

# X

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.delete("item 10")

  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_delete.rb
newt-0.9.2 examples/test_method/Listbox_delete.rb