David Hiltz wrote:
>   I saw this question posted before - but no answer.  Is there a way to
>   have multiple groups of Radiobuttons?  
>  
>   Maybe there is a flag like:
> 
>        -group => 'group-name'
> 
>   Tried it but ... no.  :(

use 

    -group => 1 

to mark the start of a new group; example:

    # first group:
    $Window->AddRadiobutton( ... );
    $Window->AddRadiobutton( ... );
    $Window->AddRadiobutton( ... );

    # second group:
    $Window->AddRadiobutton( -group => 1, ... );
    $Window->AddRadiobutton( ... );
    $Window->AddRadiobutton( ... );


BTW, I'm thinking about a AddRadiobuttons() method that
will automatically add an entire group, like this:

    $Window->AddRadiobuttons(
        -text => [ "One", "Two", "Three" ],
        -pos  => [ 100, 100 ],
        -height => 20,
    );

this will add three Radiobuttons at (100, 100), (100, 120)
and (100, 140); there will probably also be an -horizontal => 1
option...
what do you think about it?

cheers,
Aldo

__END__
# Aldo Calpini
%_ = split undef, join ' ', qw(fahokem 
xritajbugne csuctawer jhdtlrnpqloevkshpr
); print map $_{$_}, sort keys %_;





Reply via email to