|
楼主 |
发表于 2014-4-24 12:05:33
|
显示全部楼层
procedure(Display()
let((Displayfile myform)
Displayfile = axlTempFile()
myform = outfile(Displayfile "w")
fprintf(myform "#Created by xml2bnf perl utility\n")
fprintf(myform "#Coded by Venkata Ramanan/Santa Clara, CA\n\n")
fprintf(myform "FILE_TYPE=FORM_DEFN VERSION=2\n")
fprintf(myform "FORM AUTOGREYTEXT\n")
fprintf(myform "FIXED\n")
fprintf(myform "PORT 37 20\n")
fprintf(myform "HEADER \"SYLAR tools\"\n\n")
fprintf(myform "POPUP <ENUM>\"ITEM1\"\"0\",\"ITEM2\"\"1\",\"ITEM3\"\"2\",\"LAST ONE\"\"3\".\n\n")
fprintf(myform "TILE\n\n")
;------------------------------;
; Set the General Group ;
;------------------------------;
fprintf(myform "GROUP \"General\"\n")
fprintf(myform "GLOC 1 1\n")
fprintf(myform "GSIZE 35 12\n")
fprintf(myform "ENDGROUP\n")
;------------------------------;
; Set the ON-OFF Group ;
;------------------------------;
fprintf(myform "## Button Field in FORM ## \n")
fprintf(myform "FIELD ALLON\n")
fprintf(myform "FLOC 1 3\n")
fprintf(myform "MENUBUTTON \"ON\" 3 3\n")
fprintf(myform "FGROUP \"PBTop\"\n")
fprintf(myform "ENDFIELD \n\n")
fprintf(myform "## Button Field in FORM ## \n")
fprintf(myform "FIELD ALLOFF\n")
fprintf(myform "FLOC 7 3\n")
fprintf(myform "MENUBUTTON \"OFF\" 3 3\n")
fprintf(myform "FGROUP \"PBTop\"\n")
fprintf(myform "ENDFIELD \n")
fprintf(myform "ENDFORM\n\n")
close(myform)
myform = axlFormCreate(gensym() Displayfile '("NE" "msglines" 0) 'DisplayAction t nil)
axlFormDisplay(myform)
axlFormSetField(myform "sub_menuclass" 1)
when(isFile(Displayfile)
deleteFile(Displayfile)
)
)
)
procedure(DisplayAction(myform)
let(n( )
case(myform->curField
("ALLOFF"
axlVisibleDesign(nil)
axlVisibleUpdate(nil)
;Button Field
;Enter Action Here
)
("ALLON"
axlVisibleDesign(t)
axlVisibleUpdate(t)
;Button Field
;Enter Action Here
) 我實在 不知道怎麼弄了 ,如果能加載單獨加載form 應該可以用您的這個,目前最好是一起 |
|