问: 你可以在设置FramType的之前,查询相应模具的个数,然后再根据这个模具数,调整FramType属性。 如: if ParName<>''''机器型号'''' then Exit;
if ((ModalCount div 2)>0) and (ModalCount<>1) then begin if 当前模具是第1个 then begin frMemoview.Framtype=13; ParValue=''''''''; end else if (当前模具<>ModalCount div 2) and (当前模具<>ModalCount) then begin frMemoview1.FramTyp=5; ParValue=''''''''; end else if (当前模具=ModalCount div 2) then frMemoview1.FramTyp=5; Inc(当前模具); end else if 当前模具=ModalCount then begin frMemoview1.FramTyp=13; ParValue:=''''''''; end