steps

Discussion in 'Perl Misc' started by Robin, Jan 30, 2010.

  1. Robin

    Robin Guest

    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
     
    Robin, Jan 30, 2010
    #1
    1. Advertising

  2. Robin

    Dr.Ruud Guest

    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
     
    Dr.Ruud, Jan 30, 2010
    #2
    1. Advertising

  3. Robin

    smallpond Guest

    On Jan 29, 8:05 pm, 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.


    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;
     
    smallpond, Feb 1, 2010
    #3
  4. Robin

    Robin Guest

    smallpond wrote:
    > On Jan 29, 8:05 pm, 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.

    >
    > 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
     
    Robin, Feb 1, 2010
    #4
  5. Robin

    Robin Guest

    smallpond wrote:
    > On Jan 29, 8:05 pm, 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.

    >
    > 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;
     
    Robin, Feb 1, 2010
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Namratha Shah \(Nasha\)
    Replies:
    0
    Views:
    2,670
    Namratha Shah \(Nasha\)
    Nov 4, 2004
  2. Earl Teigrob
    Replies:
    1
    Views:
    775
    Earl Teigrob
    Oct 31, 2003
  3. Niks
    Replies:
    1
    Views:
    554
    Steve C. Orr [MVP, MCSD]
    Dec 17, 2003
  4. Marcel Balcarek

    Conversion from ASP to ASP .NET steps

    Marcel Balcarek, Jul 26, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    329
    Bryant Hankins
    Jul 26, 2004
  5. Beren
    Replies:
    6
    Views:
    1,254
    Scott Allen
    Nov 26, 2004
Loading...

Share This Page