all tasks
This commit is contained in:
parent
b83f433714
commit
68f8f3e56b
14735 changed files with 178959 additions and 0 deletions
|
|
@ -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();
|
||||
|
|
@ -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;
|
||||
|
|
@ -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
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue