1 TCHUI.TForm TCHUI.TKader TCHUI.TLijn TCHUI.TLabel TCHUI.TButton TCHUI.TButton 2 lbSelected: $LB(TaalA,Tray,TaalB,Tray,...) lbTaal:%String,lbSelected:%String %Integer 0:$LI(lbSelected,TaalInSelectedPos+1),1:0)) . For TrayLoop=1:1:..#cntNrOfTrays Do .. Do ##class(TCHUI.TLabel).Create(%this,"lblTray"_TrayLoop,"Tray "_TrayLoop,3,10+(TrayLoop*10),,,,,,$LB(,,$$$fsUnderline)) .. Set TabNr=TabNr+1 .. Set CheckBox=##class(TCHUI.TCheckBox).Create(%this,"chkTray"_TrayLoop_Taal,"",Top,11+(TrayLoop*10),,,TabNr,TabNr) .. Set CheckBox.Tag=$LB(Taal,$$IntToBits^vhLib(2**(TrayLoop-1))) ;bit selectie tray1=1, tray2=2, tray3=4, tray4=8 .. Set CheckBox.Checked=$BIT(SelectedTraysAsBits,TrayLoop) ;Form height en width aanpassen Set ..Height=((Count-1)*2)+9 Set ..Width=17+(..#cntNrOfTrays*10) ;Form centreren Do ..Center() ;Statische buttons nog een volgorde geven, starten na laatste checkbox Do ..SetTabAndPaintOrder(TabNr+1,..btnOk,..btnCancel) Quit ..ShowModal() ]]> %String