Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > steps

Reply
Thread Tools

steps

 
 
Robin
Guest
Posts: n/a
 
      01-30-2010
What would some of the steps be to design modules for perl that are a
way people can do gui programming on windows?
I don't exactly know where to start and would like some human input.

Thank you,
-robin
 
Reply With Quote
 
 
 
 
Dr.Ruud
Guest
Posts: n/a
 
      01-30-2010
Robin wrote:

> What would some of the steps be to design modules for perl that are a
> way people can do gui programming on windows?
> I don't exactly know where to start and would like some human input.


It's already been done, so you can find out how.

For example: wxperl
http://en.wikipedia.org/wiki/WxPerl

--
Ruud
 
Reply With Quote
 
 
 
 
smallpond
Guest
Posts: n/a
 
      02-01-2010
On Jan 29, 8:05*pm, Robin <(E-Mail Removed)> wrote:
> What would some of the steps be to design modules for perl that are a
> way people can do gui programming on windows?
> I don't exactly know where to start and would like some human input.


Here is a GUI for some steps:

#!/usr/bin/perl
use strict;
use warnings;
use Tk;

my $mw = MainWindow->new;
my ($num);

sub steps {
my ($ix, $x, $y, $size);
my $c = $mw->Canvas(-width=>150, -height=>150, -background=>'Green')-
>grid();

$size=150 / ($num + 1);
$x=$y=$size/2;
my @segs=($x,$y);
for ($ix=0; $ix<$num; $ix++) {
$y+=$size; push @segs,$x,$y;
$x+=$size; push @segs,$x,$y;
}
$c->createLine(@segs, -width=>3);
}

$mw->Label(-text=>'Number of steps')->grid(
$mw->Entry(-width=>6, -textvariable=>\$num));
$mw->Button(-text=>'Enter', -command=>\&steps)->grid(
$mw->Button(-text=>'Quit', -command=> sub {$mw->destroy}));

$mw->MainLoop;
 
Reply With Quote
 
Robin
Guest
Posts: n/a
 
      02-01-2010


smallpond wrote:
> On Jan 29, 8:05*pm, Robin <(E-Mail Removed)> wrote:
> > What would some of the steps be to design modules for perl that are a
> > way people can do gui programming on windows?
> > I don't exactly know where to start and would like some human input.

>
> Here is a GUI for some steps:
>
> #!/usr/bin/perl
> use strict;
> use warnings;
> use Tk;
>
> my $mw = MainWindow->new;
> my ($num);
>
> sub steps {
> my ($ix, $x, $y, $size);
> my $c = $mw->Canvas(-width=>150, -height=>150, -background=>'Green')-
> >grid();

> $size=150 / ($num + 1);
> $x=$y=$size/2;
> my @segs=($x,$y);
> for ($ix=0; $ix<$num; $ix++) {
> $y+=$size; push @segs,$x,$y;
> $x+=$size; push @segs,$x,$y;
> }
> $c->createLine(@segs, -width=>3);
> }
>
> $mw->Label(-text=>'Number of steps')->grid(
> $mw->Entry(-width=>6, -textvariable=>\$num));
> $mw->Button(-text=>'Enter', -command=>\&steps)->grid(
> $mw->Button(-text=>'Quit', -command=> sub {$mw->destroy}));
>
> $mw->MainLoop;



thanks for the advice.... I really appreciate your post.

I didn't realize it was that simply to create 'em.



-Robin
 
Reply With Quote
 
Robin
Guest
Posts: n/a
 
      02-01-2010


smallpond wrote:
> On Jan 29, 8:05*pm, Robin <(E-Mail Removed)> wrote:
> > What would some of the steps be to design modules for perl that are a
> > way people can do gui programming on windows?
> > I don't exactly know where to start and would like some human input.

>
> Here is a GUI for some steps:
>
> #!/usr/bin/perl
> use strict;
> use warnings;
> use Tk;
>
> my $mw = MainWindow->new;
> my ($num);
>
> sub steps {
> my ($ix, $x, $y, $size);
> my $c = $mw->Canvas(-width=>150, -height=>150, -background=>'Green')-
> >grid();

> $size=150 / ($num + 1);
> $x=$y=$size/2;
> my @segs=($x,$y);
> for ($ix=0; $ix<$num; $ix++) {
> $y+=$size; push @segs,$x,$y;
> $x+=$size; push @segs,$x,$y;
> }
> $c->createLine(@segs, -width=>3);
> }
>
> $mw->Label(-text=>'Number of steps')->grid(
> $mw->Entry(-width=>6, -textvariable=>\$num));
> $mw->Button(-text=>'Enter', -command=>\&steps)->grid(
> $mw->Button(-text=>'Quit', -command=> sub {$mw->destroy}));
>
> $mw->MainLoop;

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help with Media Player/Firefox. Gone over steps already andam stuck. Christopher Bogart Firefox 1 01-06-2006 02:19 AM
cisci ip phone 7960, what are the first steps of configuration ??? randolf balasus Cisco 4 06-16-2005 06:32 AM
Article:TlbImp (21 steps to ans your Interview Q's -.NET FrameWork Tools Series) Namratha Shah \(Nasha\) ASP .Net 0 11-04-2004 06:15 AM
Autonegotiation, DTP, PAgP, and STP steps a port moves through John Sasso Cisco 2 08-14-2004 03:37 PM
Private Frame Relay steps xlate101@yahoo.com Cisco 8 11-18-2003 11:59 PM



Advertisments