Hello fellow monks

I am trying to learn Win32::GUI for a small personal project i am working on. I eventually would like to do is display several lines of output into the main window, have a button that opens up browser when clicked, and sit in the systray when minimized. I have the last two things figured out and working using the examples on the project's CPAN page. However I am getting stuck with how to display multiple lines of text in the main window.

I have tried to do the following using Addlabel:

#!/usr/bin/perl -w use strict; use Win32::GUI; my $mw = Win32::GUI::Window->new ( -name => 'Main', -width => 300, -height => 100, -text => 'bbtrack', ); my $label1 = $mw->AddLabel( -text => "hello"); my $label2 = $mw->AddLabel( -text => "hello2"); $label1->show(); $label2->show(); $mw->Show(); Win32::GUI::Dialog();

This however doesnt work and i end up with the following error

Can't locate auto/Win32/GUI/Label/show.al in @INC (@INC contains: C:/P +erl/lib C: /Perl/site/lib .) at guitest.pl line 15

Am I perhaps going about this the wrong way? or/and there is a better way of doing what i am trying to do?

thanks for the help in advance


In reply to adding multiple labels with win32::GUI by paulehr

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.