• This forum is the machine-generated translation of www.cad3d.it/forum1 - the Italian design community. Several terms are not translated correctly.

color the input fields in dcl

  • Thread starter Thread starter Angelo2449
  • Start date Start date

Angelo2449

Guest
Hello everyone,
I would like to color the input fields of the mask written in dcl but I do not get any results.
This is the code I wrote:
Code:
pf : dialog {

      label = "immissione dati punto fiduciale";

      : edit_box {
        label = "nome del punto fiduciale";
        key = "pf";
        edit_width = 11;
        color = 1;
        allow_accept = true;
      }

      : edit_box {
        label = "coordinata x";
        key = "cx";
        edit_width = 11;
        allow_accept = true;
      }
      : edit_box {
        label = "coordinata y";
        key = "cy";
        edit_width = 11;
        allow_accept = true;
      }

     ok_cancel ;
     :text_part {
         label = "designed and created";
      }
     :text_part {
         label = "by angelo";
      }
     }
the instruction "color = 1;" in the first statement does not work, I also attach its .lsp file
Code:
(defun c:pf (/ nomepf coox cooy puntoins puntoins1 raggio)

  (setq dcl_id (load_dialog "pf.dcl"))
  (if (not (new_dialog "pf" dcl_id))
    (exit)
  );if

  (set_tile "pf" "pf")
  (set_tile "cx" "")
  (set_tile "cy" "")

  (mode_tile "pf" 2)
  (action_tile
    "cancel"
    "(done_dialog) (setq userclick nil)"
  )

  (action_tile
    "accept"
    (strcat
      "(progn (setq nomepf (get_tile \"pf\"))"
      "(setq coox (get_tile \"cx\"))"
      "(setq cooy (get_tile \"cy\"))"
      " (done_dialog)(setq userclick t))"
    )

  )
  (start_dialog)
  (unload_dialog dcl_id)

  (if userclick
      (progn
          (setq spf (strcat nomepf " - " coox "," cooy)) 
          (setq puntoins (getpoint "\npunto di inserimento >> "))
          (setq puntoins1 (list (car puntoins) (- (cadr puntoins) 1.00)))

          (command "_circle" puntoins1 10 "")
          (command "_change" "_last" "" "_p" "_c" "_red" "")
          (command "_circle" puntoins1 0.50 "")
          (command "_text" puntoins 0.30 0.00 spf "")
      )
  )
grazie.
 

Forum statistics

Threads
44,997
Messages
339,767
Members
4
Latest member
ibt

Members online

No members online now.
ciao
Back
Top