On Tue, 17 Sep 2002 22:53:12 +0200, [EMAIL PROTECTED] (Prabu
Subroto) wrote:

>  Dear my friends,
>
>Any body would be so kind to teach me how to put label and input of a 
>form in one row.
>I am meaning like this :
>"
>Name of person : [input column with entry widget]
>"

Try this one:
#########################################################
#!/usr/bin/perl
use Tk;

my $MainWindow = MainWindow->new;
$MainWindow->title("Data Entry Form");

$MainWindow -> Label(-justify => 'left',
                     -text => "Name of person : ")
            ->pack(-side => 'left',-anchor => 'n');

my $entry = $MainWindow -> Entry(-selectborderwidth => 10)
            ->pack(-side => 'top',-anchor => 'n');

$entry->bind('<Return>',[\&somesub]);
$entry->focus;


$MainWindow -> Button(-text => "OK",
                     -command => \&somesub)
             ->pack(-side => 'bottom',-anchor => 'center');

MainLoop;

sub somesub {
    $,="\n";
    $NameOfPerson = $entry -> get;
    print "\nNameOfPerson ->$NameOfPerson\n";
    $MainWindow -> destroy;
    }
####################################################

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to