#!perl -w use strict; #use warnings; use Win32::GUI(); my $w = 250; my $h = 100; my $main = Win32::GUI::Window->new( -name => 'Main', -text => 'Example Window', -width => $w, -height => $h, -resizable => 0 ); $main->AddRadioButton ( -name => 'radio_1', -pos => [10, 10], -size => [12,12], -checked => '1', -click => sub{$main->user_text->Change(-readonly => 1);}, ); $main->AddLabel( -text => "Disable Textfield", -pos => [25,10], ); $main->AddRadioButton ( -name => 'radio_2', -pos => [10, 30], -size => [12,12], -click => sub{$main->user_text->Change(-readonly => 0);}, ); $main->AddLabel( -text => "Enable Textfield", -pos => [25,30], ); $main->AddTextfield( -name => 'user_text', -pos => [110,28], -size => [60,20], -align => 'left', -readonly => 1, ); $main->Show(); Win32::GUI::Dialog();