Testing the Image Button
Hi all.
I can't get the dialog image display to work
What is wrong with the following sample?
Thank you.
test1:dialgo{ label = "Testing the Image Button";
: image_button {
key = "image_btn";
label = "image";
width = 50;
height = 50;
fixed_width = true;
fixed_height = true;
image = "image";
}
ok_only;
}
There was an error in the uploaded code, which has been corrected.
Comments
-
Here is a lisp that makes 3x3 or 4x3 dcl on the fly may give you the answer your looking for or this other one for drawing a kitchen table. And a just display a slide. Trying to find draw table.lsp code.
(defun Splash (s w / sn dcl-fn dcl-fp dcl-id x y)
(vl-load-com)
(cond
((not (= (type s) 'STR))(princ (strcat "\nInvalid slide name : " (vl-princ-to-string s))))
((not (setq sn (findfile s))) (princ (strcat "\nSlide not found : " (vl-princ-to-string s))))
((not (= (type w) 'INT))(princ (strcat "\nInvalid value for delay : " (vl-princ-to-string w))))
((not (and (setq dcl-fn (vl-filename-mktemp ".dcl")) (setq dcl-fp (open dcl-fn "w")))) (princ "\nUnable to show slide"))
(t (write-line (strcat "im:dialog{label="Alan H Consulting ";:image_button{key="im";color=-2;width=60;"
"aspect_ratio=0.5;allow_accept=true;is_default=true;}}") dcl-fp)
(close dcl-fp)(gc)
(setq dcl-id (load_dialog dcl-fn))
(new_dialog "im" dcl-id)
(setq x (dimx_tile "im") y (dimy_tile "im"))
(start_image "im")
(slide_image 0 0 x y sn)
(end_image)
(wait w)(term_dialog)(if dcl-id (unload_dialog dcl-id))(if (and dcl-fn (findfile dcl-fn))(vl-file-delete dcl-fn))
)
)
(princ)
)
(defun wait (sec / stop) (setq stop (+ (getvar "DATE") (/ sec 86400.0))) (while (> stop (getvar "DATE"))))(Splash "LOGO.sld" 2)
0