;| KozMos VLDCL Sample Visual LISP file Programmer: Koz Jono Yeoh 25th, April 2006 ---------------------------------------------------------------------------------------- This file will demonstrate using new VLDCL VirtualButton feature. The picking times will be recorded and the text content/color will also be changed. The number of picked time will be the ACI color of the text displayed in button. |; (defun c:VLDCL-VButton (/ c:vldcl-done-ok sub-PickButton *DCL-DATA* *pick* DCLFile Dialog ) ;;; Define operations for press [OK] (defun c:vldcl-done-ok () (vldcl-msgbox "!" nil "Thanks for testing VLDCL-VirtualButton" ) ) (Defun sub-PickButton (/ str) (if (null *pick*) (setq *pick* 1) (setq *pick* (1+ *pick*)) ) (if (> *pick* 256) (setq *pick* 1) ) (setq str (strcat "You have picked me " (itoa *pick*)" time(s)!")) (vldcl-vbutton "Pick" str *pick*) ) (setq *DCL-DATA* '( ;;; Define VButton data ("Pick" (0 . "vbutton") (2 . "(Sub-PickButton)") (4 . 0) (5 . "You have picked me 0 time(s)!") ) ) DCLFile "G:\\KozMos Products Base\\VLDCL\\Package\\samples\\VLDCL-VButton.DCL" Dialog "VButton" ) (vlisp-export-symbol '*DCL-DATA*) (vldcl-module DCLFile Dialog 0) )