Old stuff/Perl/ciel/gtk2/test.pl
(Deskargatu)
#!/usr/bin/perl -w
use Gtk2 '-init';
$window = Gtk2::Window->new('toplevel') or die "impossible de construire la fen�tre : $!\n";
$window->set_default_size (690,690);
$window->set_position ('center');
$window->set_title ('application de gestion');
# conteneur menu
$menu = Gtk2::Menu->new() or die "impossible de construire le menu : $!\n";
# option 1 menu
$amortissement = Gtk2::MenuItem->new('Amortissements') or die "impossible de construire l'option amortissements: $!\n";
$menu->append($amortissement);
$amortissement->show();
# entree 1 menu
$operation = Gtk2::MenuItem->new('Operations') or die "impossible de construire le menu operations: $!\n";
# on ajoute le submenu operation
$operation->set_submenu($menu);
$operation->show();
# on cr�e la menubar
$menubar = Gtk2::MenuBar->new();
$menubar->append($operation);
$menubar->show();
$window->show();
$window->add($menubar);
$window->signal_connect('delete_event',sub{Gtk2->main_quit;});
Gtk2->main();