use strict; use Win32::GUI; my $Window = new Win32::GUI::Window( -name => "Window", -left => 100, -top => 100, -width => 150, -height => 150, -title => "checkbox test", ); $Window->AddCheckbox( -name => 'mycheckbox', -left => 10, -top => 10, -height => 15, -width => 15, ); $Window->AddButton( -text => 'Hide checkbox', -left => 10, -top => 35, -height => 30, -width => 100, -name => 'btnHide', ); $Window->AddButton( -text => 'Show checkbox', -left => 10, -top => 75, -height => 30, -width => 100, -name => 'btnShow', ); $Window->Show(); Win32::GUI::Dialog(); sub Window_Terminate { return -1; } sub btnShow_Click { $Window->mycheckbox->Show(); } sub btnHide_Click { $Window->mycheckbox->Hide(); }