- 论坛徽章:
- 0
|
如附件所示
我有2个项目,每个项目分别有2种选项
可是这4个选项会相互干扰,比如“Choose Pattern”选择了的,然后去“Choose Action”里选,这个时候“Choose Pattern”选择了的项目会被取消掉
感觉是4个选项不能同时有2个选择
怎么样能够让它们2个2个1组,相互不干扰呢??
麻烦大家指点一下,先谢谢了!!
我的代码:
#!/usr/bin/perl -w
use strict;
use warnings;
use Win32::GUI;
my $mainWin = Win32::GUI::Window->new (
-title =>"Test",
-size => [420, 370],
-name => 'MainWin',
);
$mainWin->AddLabel(
-pos => [ 1, 53 ],
-size => [ 120, 21 ],
-text => " Choose Pattern:",
# -background =>"#FFFFFF",
);
my $pattern1 = $mainWin->AddRadioButton (
-pos => [ 120, 50 ],
-name => "Dos2Unix",
-size => [ 85, 21 ],
-text => "Dos => Unix",
-tabstop => 1,
-checked => 1,
# -background =>"#FFFFFF",
);
my $pattern2 = $mainWin->AddRadioButton (
-pos => [ 230, 50 ],
-name => "Unix2Dos",
-size => [ 85, 21 ],
-text => "Unix => Dos",
-tabstop => 1,
-checked => 0,
# -background =>"#FFFFFF",
);
$mainWin->AddLabel(
-pos => [ 1, 80 ],
-size => [ 120, 21 ],
-text => " Choose Action :",
# -background =>"#FFFFFF",
);
my $action1 = $mainWin->AddRadioButton (
-pos => [ 120, 75 ],
-name => "check",
-size => [ 85, 21 ],
-text => "Check Only",
-tabstop => 1,
-checked => 0,
# -background =>"#FFFFFF",
);
my $action2 = $mainWin->AddRadioButton (
-pos => [ 230, 75 ],
-name => "check_trans",
-size => [ 105, 21 ],
-text => "Check && Trans",
-tabstop => 1,
-checked => 0,
# -background =>"#FFFFFF",
);
$mainWin->Show();
Win32::GUI:ialog ();
exit (0); |
|