HEX
Server: Apache
System: Linux br1102.hostgator.com.br 5.14.0-687.17.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Mon Jun 22 07:21:26 EDT 2026 x86_64
User: rkcent87 (3754)
PHP: 8.3.32
Disabled: NONE
Upload Files
File: //usr/share/doc/perl-Curses-UI/examples/demo-buttonbox
#!/usr/bin/perl -w
# 2004 (c) by Marcus Thiesen (marcus@thiesen.org)
# This file is a part of Curses::UI and might be distributed 
# under the same terms as perl itself.

# Use the libraries from the distribution, instead of 
# system wide libraries.

use FindBin;
use lib "$FindBin::RealBin/../lib";

use strict;
use Curses::UI;

$Curses::UI::debug = 0;

my $cui = new Curses::UI( -color_support => 1 );

my $win1 = $cui->add(
		     'win1', 'Window',
		     -border => 1,
		     -y    => 1,
		     -bfg  => 'red',
		     );

$win1->add("box1", "Buttonbox",
	   -buttons => [ {
	       -label => "< ADD >",
	        }, {
		-label => "< FOO >" }] ,

	 );

$win1->add("box2", "Buttonbox",
	   -y => 10,
	   -vertical => 1,
	   -buttons => [ {
	       -label => "< ADD >",
	        }, {
		-label => "< FOO >" }] ,

	 );

$cui->set_binding( sub {exit 0;}, "q");
$cui->mainloop;