 *** Welcome to SAD Ver.1.4.4.2k64 built at 2026-10-19 14:46:59 +0900 ***
 *** Today: 01:53:17 Tuesday 11/17/2026 ***
 OFF LOG;ON ECHO;READ 77 ;           1
! KBFrame.n の KBMainFrame / KBFComponentFrame / KBFGroup / KBFCheckButton (ラティスなし)
! KEK の標準の窓の枠 (メニューバー: KEK File Edit Window Task Help、時計) に、チェックボタンの組を入れる
FFS;
 *** SADScript Initialization: /mnt/d/work/SAD-master/SAD-master/Packages/init.n ***
 *** Run time Environment:     /mnt/d/work/SAD-master/SAD-master/Packages/init.local.n ***
 RFSW RADCOD RAD  FLUC  INTRA POL   COD  DAPER EMIOU K64   FOURI SMEAR
   F     F     F     T     F     F     T     F     F     T     F     T
 TclEval["proc dw {w d} {set o {}; foreach c [winfo children $w] {set t {}; catch {set t [$c cget -text]}; lappend o [format {%*s%s %s} $d {} [winfo class $c] $t]; foreach x [dw $c [expr {$d+2}]] {lappend o $x}}; return $o}"];
 w = KBMainFrame["LabelFrameDemo", f, Title->"LabelFrame Demo"];
 cb[0] = CheckButton[Text->"Enable", Variable:>cbv[0],
   Command:>(Scan[(cb[#][State] = If[cbv[0], "normal", "disabled"])&, Range[3]])];
 cf = KBFComponentFrame[f, Add->{
   KBFHook[Command:>(cbv[0] = True)],
   KBFGroup[WidgetOption->{LabelWidget->cb[0]}],
   KBFCheckButton[Text->"A", Variable:>cbv[1], WidgetVariable:>cb[1]],
   KBFCheckButton[Text->"B", Variable:>cbv[2], WidgetVariable:>cb[2]],
   KBFCheckButton[Text->"C", Variable:>cbv[3], WidgetVariable:>cb[3]]}];
 TclEval["update"];
 tree=TclEval["join [dw . 0] {; }",String];
 Print["classes: ",StringLength[tree]," chars"];
classes: 539 chars
 Print["Menubutton count=",TclEval["set n 0; proc cnt {w cls} {global n; foreach c [winfo children $w] {if {[winfo class $c] eq $cls} {incr n}; cnt $c $cls}}; cnt . Menubutton; return $n",String]];
Menubutton count=6
 Print["Checkbutton count=",TclEval["set n 0; cnt . Checkbutton; return $n",String]];
Checkbutton count=4
 Print["Labelframe count=",TclEval["set n 0; cnt . Labelframe; return $n",String]];
Labelframe count=2
 Exit;
Out[1]:= Exit
 FFS                  end:  CPU time =     0.059 sec
 Design orbit length =   1.0000000000000000     
 RFSW RADCOD RAD  FLUC  INTRA POL   COD  DAPER EMIOU K64   FOURI SMEAR
   T     F     F     T     F     F     T     F     F     T     F     T
 In[2]:=  ???-getbuf-end of input stream
