#!/usr/bin/perl use strict; use warnings 'all'; use Tk; use Tk::LabEntry; # Frame erstellen(hier MainWindow als Frame Ersatz) my $mw = tkinit(); # erstellen der (Text-)Eintragsfelder my($dbhost, $user, $passwd) = ("","",""); $mw -> LabEntry ( -label => "Datenbankhost: " , -labelPack => [ -side => "left" ] , -textvariable => \$dbhost , -background => "white" ) -> pack ( -anchor => "w" ); $mw -> LabEntry ( -label => "User: " , -labelPack => [ -side => "left" ] , -textvariable => \$user , -background => "white" ) -> pack ( -anchor => "w" ); $mw -> LabEntry ( -label => "Passwort: " , -labelPack => [ -side => "left" ] , -textvariable => \$passwd , -background => "white" ) -> pack ( -anchor => "w" ); # verbinden button erstellen $mw -> Button ( -text => "Verbinden" , -command => sub { print("DBHost: $dbhost\nUser: $user\nPassword: $passwd\n") } ) -> pack ( ); MainLoop;