ok_cancel_help.
Syntax:
ok_cancel_help;
The ok_cancel_help tile is defined in the Base.Dcl file.
The key of the OK button is 'accept'.
The key of the Cancel button is 'cancel'.
The key of the Help button is 'help'.
DCL Coding:
lisp48c : dialog { //dialog name
label = "ok_cancel_help" ; //give it a label
ok_cancel_help; //predefined OK/Cancel/Help
//button
} //end dialog
gotohelp : dialog { //dialog name
label = "Help Box" ; //give it a label
: text { //define text
label = "This is the Help Box" ; //give it a label
} //end text
ok_only ; //predefined OK Button
} //end dialog
AutoLisp Coding:
(defun C:lisp48c ()
;define function
(setq dcl_id (load_dialog "lisp48c.dcl"))
;load dialog
(if (not (new_dialog "lisp48c" dcl_id)
;test for dialog
);not
(exit)
;exit if no dialog
);if
(action_tile
"accept"
;if O.K. pressed
"(done_dialog) (setq userclick T)"
;close dialog, set flag
);action tile
(action_tile
"cancel"
;if cancel button pressed
"(done_dialog) (setq userclick nil)"
;close dialog, lower flag
);action_tile
(action_tile
"help"
;if help button pressed
"(gotohelp)"
;call help function
);action_tile
(start_dialog)
;start dialog
(unload_dialog dcl_id)
;unload
(if userclick
;if OK selected
(alert "You selected OK")
;inform the user
(alert "You selected Cancel")
;inform the user
);if
(princ)
);defun
(defun gotohelp ()
;define function
(setq dcl_id (load_dialog "lisp48c.dcl"))
;load dialog
(if (not (new_dialog "gotohelp" dcl_id)
;test for dialog
);not
(exit)
;exit if no dialog
);if
(action_tile
"accept"
;if O.K. pressed
"(done_dialog)"
;close dialog
);action tile
(start_dialog)
;start dialog
(unload_dialog dcl_id)
;unload
(princ)
);defun
(princ)
|