all tasks

This commit is contained in:
Ingy döt Net 2013-04-11 01:07:29 -07:00
parent b83f433714
commit 68f8f3e56b
14735 changed files with 178959 additions and 0 deletions

View file

@ -0,0 +1,10 @@
use Tk;
$main = MainWindow->new;
$l = $main->Label('-text' => 'There have been no clicks yet.')->pack;
$count = 0;
$main->Button(
-text => ' Click Me ',
-command => sub { $l->configure(-text => 'Number of clicks: '.(++$count).'.'); },
)->pack;
MainLoop();

View file

@ -0,0 +1,27 @@
use Gtk '-init';
# Window.
$window = Gtk::Window->new;
$window->signal_connect('destroy' => sub { Gtk->main_quit; });
# VBox.
$vbox = Gtk::VBox->new(0, 0);
$window->add($vbox);
# Label.
$label = Gtk::Label->new('There have been no clicks yet.');
$vbox->add($label);
# Button.
$count = 0;
$button = Gtk::Button->new(' Click Me ');
$vbox->add($button);
$button->signal_connect('clicked', sub {
$label->set_text(++$count);
});
# Show.
$window->show_all;
# Main loop.
Gtk->main;

View file

@ -0,0 +1,7 @@
use XUL::Gui;
display
TextBox( id=>'txt', value=>'there have been no clicks yet' ),
Button( label=>'click me', oncommand=>sub{
$ID{txt}->value = ++$clicks
});