DCL檔案裡面的資料怎麼給LSP,button控制元件
阿新 • • 發佈:2021-01-30
技術標籤:jsp
#DCL檔案裡面的資料怎麼給LSP,button控制元件
求助,我想實現一個控制元件,如下圖,點選上一個返回一個數值:如-1,給LSP檔案,點選下一個返回一個數值:如+1給LSP檔案
這個button該怎麼定義,以及怎麼把這個值回撥給lsp檔案,十分感謝
下面展示一些 內聯程式碼片
。
a:dialog{ label="slider"; : edit_box { //*define edit box key = "myedit" ; //*give it a name label = "第幾個註記" ; //*give it a label edit_width = 6 ; //*6 characters only } :row{ :button{ key="" label="上一個"; } :button{ key="" label="下一個"; } } } ;2、命令列輸入 test (defun c:test( / continue curBtn dlgId ) (setq dlgId (load_dialog "slider.dcl")) (if (not (new_dialog "a" dlgId)) (exit) ) (set_tile "myedit" "1") (action_tile "myedit" ;使用者修改編輯框文字時觸發 "(ebox_action $value $reason)") ;呼叫ebox_action (defun ebox_action (val why) (if (or (= why 2) (= why 1)) (set_tile "myslider" val) ) ) (start_dialog) (cond ((= curBtn "btn1") (f1)) ((= curBtn "") (setq continue nil)) ) (unload_dialog dlgId) )
這是我參考其他人的改的,接下來不知道怎麼改了