Hii, I have a text field named Date and I want add a button beside it so that when user clicks it a calendar opens up and the user can select any date. Accordingly the text field would be updated based on the selection.
use warnings; use Win32::GUI(); my $MainWindow = Win32::GUI::Window->new( -text => 'Main', -name => 'MainWindow', -pos => [ 10, 10 ], -size => [ 700, 700 ], -dialogui => 1, ); my $IDTextFields = $MainWindow->AddTextfield( -name => "ID", -width => 150, -height => 20, -pos => [90,8], -tabstop => 1, -prompt => "From:", ); my $NameTextField = $MainWindow->AddTextfield( -name => "Name", -width => 150, -height => 20, -pos => [90,38], -password => 1, -tabstop => 1, -prompt => "To:", ); my $DateTextField = $MainWindow->AddTextfield( -name => "Date", -width => 150, -height => 20, -pos => [90,68], -password => 1, -tabstop => 1, -prompt => "Date(DD-MM-YY)", ); my $loginSave = $MainWindow->AddButton( -name => "Save", -text => "Save", -pos => [ 50, 100 ], -tabstop => 1, ); my $loginReset = $MainWindow->AddButton( -name => "Reset", -text => "Reset", -pos => [ 100, 100 ], -tabstop => 1, ); $MainWindow->Show(); Win32::GUI::Dialog(); sub Reset_Click { #wish to reset the textfield content return 0; }; sub Save_Click { #wish to call a subroutine return -1; };
Can anyone guide me how to achieve it..Thanks

In reply to Adding Calendar to win32 form by samir_gambler

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.