Welcome to the Southern African Autolisp Website.
You are Visitor Number since 11th June 1999.
edit_box.
Syntax:
: edit_box {
action alignment allow_accept edit_limit
edit_width fixed_height fixed_width
height is_enabled is_tab_stop key label mnemonic
value width password_char
}
DCL Coding:
lisp48h : dialog { //dialog name
label = "edit_box" ; //give it a label
: edit_box { //define edit box
key = "eb1"; //give it a name
edit_limit = 8; //restrict to 8 letters
label = "Enter Password"; //give it a label
mnemonic = "P"; //define mnemonic
password_char = "*"; //define password character
} //end edit box
ok_cancel ; //predefined OK/Cancel button
} //end dialog
AutoLisp Coding:
(defun C:lisp48h ()
;define function
(setq dcl_id (load_dialog "lisp48h.dcl"))
;load dialog
(if (not (new_dialog "lisp48h" dcl_id)
;test for dialog
);not
(exit)
;exit if no dialog
);if
(action_tile
"eb1"
;if a password is entered
"(setq pass $value)"
;store the password in the variable 'pass'
);action_tile
(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
(start_dialog)
;start dialog
(unload_dialog dcl_id)
;unload
(if userclick
;if OK selected
(alert (strcat "Password is: " pass))
;display the password
);if
(princ)
);defun
(princ)
All Tutorials and Code are provided "as-is" for purposes of instruction and
utility and may be used by anyone for any purpose entirely at their own risk.
Please respect the intellectual rights of others.
All material provided here is unsupported and without warranty of any kind.
No responsibility will be taken for any direct or indirect consequences
resulting from or associated with the use of these Tutorials or Code.
Copyright © 1999 by
Kenny Ramage
All rights reserved.
Information in this document is subject to change without notice.
Site created and maintained by Kenny Ramage.
|