Hi All,

When using AddGroupbox with RadioButtons, we have to use -group
with -tapstop. However I am trying to use a Groupbox to contain a number of
Textfields and other controls, and have not been able to tab at all.

Using the Groupbox works perfectly as a container and by using -parent,
resize event offsets are easier to calculate. The only thing I can't get
working is the ability to tab between the controls. Does anybody know the
correct way of doing this, or is it not possible?

Chris Wearn


#!perl -w
use Win32::GUI;
$MainWindow = new Win32::GUI::Window(
    -title   => 'tabbing',
    -left    => 100,
    -top     => 100,
    -width   => 500,
    -height  => 400,
    -name    => 'MainWindow',
);

$gpbSessSettings = $MainWindow ->AddGroupbox(
        -name           => "gpbThisSettings",
        -left           => 10,
        -top            => 10,
        -width  => 250,
        -height => 200,
        -text           => " SESSION SETTINGS",
);

# TEXTFIELD - Save Path
$txtSavePath = $MainWindow ->AddTextfield(
        -parent => $gpbSessSettings,
        -name       => "txtSavePath",
        -left       => 10,
        -top        => 20,
        -text       => "",
        -width      => 80,
        -height     => 22,
        -group  => 1,
        -tabstop    => 0,
);

# TEXTFIELD - Save Name
$txtSaveName = $MainWindow ->AddTextfield(
        -parent => $gpbSessSettings,
        -name       => "txtSaveName",
        -left       => 10,
        -top        => 45,
        -text       => "",
        -width      => 80,
        -height     => 22,
        -tabstop    => 0,
);

$MainWindow ->Show();
$rc = Win32::GUI::Dialog(0);

sub MainWindow_Terminate {
    $MainWindow ->PostQuitMessage(1);
    # return -1;
}


Reply via email to