Sha256: 43c161bba649c5347392a56fcc89064b942e5c39a2ded7f2939f5ac0dc1496b9

Contents?: true

Size: 539 Bytes

Versions: 1

Compression:

Stored size: 539 Bytes

Contents

#!/usr/bin/env ruby

require 'rubygems'
require "newt"

begin
  LABEL_COLOR1 = Newt::COLORSET_CUSTOM 1
  LABEL_COLOR2 = Newt::COLORSET_CUSTOM 2

  Newt::Screen.new
  Newt::Screen.set_color(LABEL_COLOR1, "green", "cyan")
  Newt::Screen.set_color(LABEL_COLOR2, "red", "black")

  l1 = Newt::Label.new(1, 5, "Label1")
  l1.set_colors(LABEL_COLOR1)
  l2 = Newt::Label.new(1, 9, "Label2")
  l2.set_colors(LABEL_COLOR2)

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

  f = Newt::Form.new
  f.add(l1, l2, b)

  f.run()

ensure
  Newt::Screen.finish
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
newt-0.9.7 examples/test_method/Label_set_colors.rb