in reply to Re^3: Tk: Dynamic Radiobuttons toggle problem...
in thread Tk: Dynamic Radiobuttons toggle problem...

Thanks so much Keszler, you've been a great help and also to you, stefbv, for posting the example code (added to my own code bank for future posting for others).

With the code im posting in this post, everything is working correctly and im pretty sure i understand whats going on :)

By doing the following (@$names[0] = unique file ID)...
-value=>"both_@$names[0]", -variable=>"both_@$names[0]"
-value=>"install_@$names[0]", -variable=>"both_@$names[0]"
The 'variable' is grouping the two buttons for each row because it is using the files unique ID along with the same prefix.
Since the 'value' is also using the files unique ID along with the same prefix(s) "defined/available" in the 'variable', it will attach itself to the correct r-buttons and toggle correctly.

Am i understanding that correctly ?

Here's the 'sub', revised and cleaned up a little if any one is interested.
sub setExensionFilesChk{ my $extensionNameIndex = $_[0] || return ; $extensionNameIndex = ($extensionNameIndex -1); my $extNameIs = "$extensionNames[$extensionNameIndex][0]"; $extFileFrame->destroy if $extFileFrame; $extFileFrame = $fileListPane -> Frame(); $extFileFrame->configure( -width=>575, -height=>400 ); $extFileFrame -> grid(-row=>1,-column=>1,-columnspan=>4,-sticky=>" +nw"); my $rowIndex = 1; # start with 1 so that 'row' 0 is empty and resu +rved for the "total count label" my ($rdb1,$rdb2,$but,$lab); my @tmpFiles = getExtensionsFiles("$extNameIs"); for my $names ( @tmpFiles ) { $rowIndex++; # add 'Delete' button... $but = $extFileFrame -> Button(-text=>"x", -command => [ \&set +FileType_BothOrInstall_Or_Delete, "@$names[0]", 'delete', \$extension +NameIndex ]); $but -> grid(-row=>$rowIndex,-column=>0, -sticky=>"w"); # Radio Buttons... $rdb1 = $extFileFrame -> Radiobutton(-text=>"Both", -value=>"b +oth_@$names[0]", -variable=>"both_@$names[0]", -command => [ \&setFil +eType_BothOrInstall_Or_Delete, "@$names[0]", 'both' ]); $rdb1 -> grid(-row=>($rowIndex),-column=>1, -sticky=>"w"); $rdb2 = $extFileFrame -> Radiobutton(-text=>"Install", -value= +>"install_@$names[0]", -variable=>"both_@$names[0]", -command => [ \& +setFileType_BothOrInstall_Or_Delete, "@$names[0]", 'install' ]); $rdb2 -> grid(-row=>($rowIndex),-column=>2, -sticky=>"w"); if("@$names[1]" eq "both"){ $rdb1 -> select(); $rdb2 -> deselect(); } else { $rdb1 -> deselect(); $rdb2 -> select(); } # label with file path and file name... $lab = $extFileFrame -> Label(-text=>" - @$names[2]@$names[3]" +); $lab -> grid(-row=>($rowIndex),-column=>3, -sticky=>"w"); } @tmpFiles=(); my $lbl_extCount = $extFileFrame -> Label(-text=>"($rowIndex) Exte +nsion Files:"); $lbl_extCount -> grid(-row=>1,-column=>3,-columnspan=>1, -sticky=> +"w"); $extensionsFilesWindow->update; }