用法
评论
建议
取 消
确 定
(defun dcl:set-mtext (key value / i% rows width) "给 mtext 控件赋值,自动换行。当 value 的长度大于 mtext 可以容纳的长度时,结尾加 ... 号。" "" "(dcl:set-mtext \"mt\" \"给 mtext 控件赋值,自动换行。当 value 的长度大于 mtext 可以容纳的长度时,结尾加 ... 号。\")" (setq i% 0) (while (get_tile (strcat key (itoa (setq i% (1+ i%)))))) (setq rows (1- i%)) (setq width (atoi (get_attr (strcat key "1") "width"))) (setq i% 0) (setq lst-value% nil) (foreach c% (string:s2l-ansi value) (cond ((> i% rows) nil) ((= 10 c%) (set_tile (strcat key (itoa (setq i% (1+ i%)))) (string:l2s-ansi (reverse lst-value%))) (setq lst-value% nil)) ((> (string:bytelength (string:l2s-ansi (reverse (cdr lst-value%)))) (- width 6)) (set_tile (strcat key (itoa (setq i% (1+ i%)))) (string:l2s-ansi (reverse lst-value%))) (setq lst-value% (cons c% nil))) (t (setq lst-value% (cons c% lst-value%))))) (if (and (> (length lst-value%) 0) (<= i% rows)) (set_tile (strcat key (itoa (setq i% (1+ i%)))) (string:l2s-ansi (reverse lst-value%)))) (while (get_tile (strcat key (itoa (setq i% (1+ i%))))) (set_tile (strcat key (itoa i%)) "")))
函数库使用说明
应用包
技术支持
统计信息
函数库规模: 772 个
函数库类别: 54 种
上传记录
刷新