AfraLisp Blog

The AutoLisp/Visual Lisp/VBA Resource Website

AfraLisp Blog

Home Newsletter Utter Rubbish Coding Tips AutoCAD Tips Contact Downloads WAUN




	: 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


    ;exit if no dialog


      ;if a password is entered

      "(setq pass $value)"
      ;store the password in the variable 'pass'


      ;if O.K. pressed
      "(done_dialog) (setq userclick T)"
      ;close dialog, set flag	
   );action tile

    ;if cancel button pressed

    "(done_dialog) (setq userclick nil)"	
    ;close dialog, lower flag


  ;start dialog
  (unload_dialog dcl_id)

  (if userclick
  ;if OK selected

  (alert (strcat "Password is: " pass))			
  ;display the password




The AutoLisp/Visual Lisp/VBA Resource Website

Copyright 1999-Perpetuity by AfraLisp

All rights reserved.
Information in this document is subject to change without notice.
Site created and maintained by Kenny Ramage

The AutoLisp/Visual Lisp/VBA Resource Website