Dayananda Posted January 17 Posted January 17 In my dialog box I am displaying present length of a line in first edit box. Second edit box I am requesting the required length. and while that I want to inactive the first edit box. Please Help Quote
Steven P Posted January 17 Posted January 17 Here are the options for edit boxes: https://help.autodesk.com/view/ACD/2026/ENU/?guid=GUID-38A11AED-DDF5-4ACA-A8BB-1F7901D0AF50 I think if you change is_enabled from true to false it should do what you want, I can't remember jus now how to switch it from one to the other - might be a google thing 1 Quote
rlx Posted January 17 Posted January 17 (edited) you have a command called mode_tile , set it to 0 means enable tile and set it to 1 means disable it. (confusing so think my wife was somehow involved) https://help.autodesk.com/view/OARX/2025/ENU/?guid=GUID-23ACCF72-9C6F-45C0-A889-9307CC1210C2 lets say your top edit box is called "present_length" , to disable / gray out this edit box you would use (mode_tile "present_length" 1) in example below I've named the edit boxes "eb1" & "eb2" but I have to admit , using a text tile would have been just as easy. (defun tst1 ( $m / f p d r s) (if (and (setq f (vl-filename-mktemp ".dcl"))(setq p (open f "w"))) (progn (write-line (strcat "adjust :dialog {label =\"" $m "\";" ":edit_box {key=\"eb1\";label=\"Present Length\";}" ":edit_box {key=\"eb2\";label=\"Required Length\";}" "spacer;ok_cancel;}") p ) (close p)(gc) (setq d (load_dialog f))(new_dialog "adjust" d) (action_tile "eb1" "(setq s $value)") (action_tile "eb2" "(setq s $value)") (action_tile "accept" "(done_dialog 1)") (action_tile "cancel" "(done_dialog 0)") (set_tile "eb1" "1000") (mode_tile "eb1" 1) (setq r (start_dialog))(unload_dialog d)(vl-file-delete f) ) ) (if (and (= r 1) (= 'STR (type s)) (/= s "")) s nil) ) (alert (strcat "Required length : " (vl-princ-to-string (tst1 "Adjust bar 2026")))) Edited January 17 by rlx Quote
Steven P Posted January 17 Posted January 17 I'd forgotten mode_tile there, yes, that is the one to go for. Quote
BIGAL Posted January 17 Posted January 17 My $0.05. Why have two edit boxes anyway just display the current value in a single box as you have done. Just edit that value. If you have a limited number of desirable values can put those into make a choice DCL showing the preset values. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.