User input/Graphical: Difference between revisions

Content added Content deleted
m (→‎{{header|Perl}}: XUL is no longer supported by Mozilla)
Line 1,036: Line 1,036:


=={{header|Perl}}==
=={{header|Perl}}==
==={{libheader|Perl/Wx}}===

<lang perl>use Wx;
<lang perl>use Wx;

# ---------------------------------------------------------------


package MyApp;
package MyApp;
Line 1,079: Line 1,075:


MyApp->new->MainLoop;</lang>
MyApp->new->MainLoop;</lang>

==={{libheader|XUL::Gui}}===
<lang perl>use XUL::Gui;

display Window
title => 'Input Window',
width => 250,
height => 150,
TextBox( id => 'txt' ),
TextBox( id => 'num', type => 'number' ),
Button(
label => 'OK',
oncommand => sub {
print "String: " . ID(txt)->value . "\n"
. "Number: " . ID(num)->value . "\n";
quit;
},
);</lang>


=={{header|Perl 6}}==
=={{header|Perl 6}}==