AfraLisp Blog

The AutoLisp/Visual Lisp/VBA Resource Website

AfraLisp Blog

Home Newsletter Utter Rubbish Coding Tips AutoCAD Tips Contact Downloads WAUN

text_part.

text_part

Syntax: 

	: text_part {
	  key label
	}

The text_part tile is defined in the Base.Dcl file.


DCL Coding: 
lisp48v : dialog {				//dialog name
          label = "text_part" ;			//give it a label

	: paragraph {				//define paragraph

	: text_part {				//text
	  label = "You are on";			//add text
	  alignment = centered;			//center the text
	}					//end text

	: text_part {				//text
	  label = "Layer";			//add text
	  alignment = centered;			//center the text
	}					//end text

	: text_part {				//text
	  key = "txt1";				//give it a name
	  alignment = centered;			//center the text
	}					//end text

        }					//end paragraph


        ok_cancel ;				//predefined OK/Cancel button

        }					//end dialog

AutoLisp Coding: 
(defun C:lisp48v ()
;define function	

  (setq la (getvar "clayer"))

  (setq dcl_id (load_dialog "lisp48v.dcl"))
  ;load dialog

  (if (not (new_dialog "lisp48v" dcl_id)
  ;test for dialog

      );not

    (exit)
    ;exit if no dialog

  );if

  (set_tile "txt1" la)

  (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 "You selected OK")
     ;inform the user

     (alert "You selected Cancel")
     ;inform the user

  );if			

 (princ)

);defun

(princ)
 
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