Hi Monks, I am not able to get the same error/info/warning icons as i was getting using MessageBox widget.Only simple perl built-in bitmaps, i am able to get. Please help if anybody knows how to get those icons.
use strict; use warnings; use Tk; use Tk::Entry; our $mw = new MainWindow; our $main; my $new_label = $mw -> Label(-text=>"Enter any character", -foreground=>"red", -font => "verdanafont 10 bold") -> pack(-side=>"top"); my $ent=$mw->Entry()->pack(); my $press = $mw -> Button(-text=>"Press Me", -command =>\&PressMe, -font => "verdanafont 10 bold") -> pack(-side=>"left",-padx=>"5", -ipadx=>"5"); MainLoop; sub PressMe { my $val = $ent->get(); if ($val =~ m/[a-zA-Z0-9]/) { #my $response=$mw -> messageBox(-type=>"ok", -message=>"al +phanumeric entered",-icon=>"info",-title=> "info!!"); if (!Exists($main)) { $main = $mw->Toplevel; $main->geometry("250x100"); $main->transient($mw); $main->protocol('WM_DELETE_WINDOW' => sub {$main->destroy( +);}); #$main->Photo('-format'=>'jpeg', -file => "\@C:\\warn.jpg" +); #my $l=$main->Label(-image=>'hi')->pack; my $l = $main->Label(-bitmap=>"info")->pack(-side=>"left") +; my $ll=$main->Label(-text=>"Alpha numeric entered !")->pac +k(); } else { $main->deiconify(); $main->raise(); } } return; }

In reply to How to get error/info/warning icons in perl /tk by kapsule

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.