Why does not DCL close in the X?

Why does not DCL close in the X?

carlos_m_gil_p
Advocate Advocate
1,665 Views
6 Replies
Message 1 of 7

Why does not DCL close in the X?

carlos_m_gil_p
Advocate
Advocate

 

Hello boys how are you?

 

I want to ask, if anyone knows, why do not you close the dialog box, by clicking in the upper right corner (In the X)
It is not the first time that happens to me and I always have the doubt.

 

Thank you and excuse my English.


AutoCAD 2026
Visual Studio Code 1.99.3
AutoCAD AutoLISP Extension 1.6.3
Windows 10 (64 bits)

Accepted solutions (1)
1,666 Views
6 Replies
Replies (6)
Message 2 of 7

scot-65
Advisor
Advisor
Without looking at your attachments...

Inside the DCL:
:button {key="cancel"; label="Cancel"; is_cancel="true";}

If you are using the built-in ok_cancel, it is written inside by default.

???

Scot-65
A gift of extraordinary Common Sense does not require an Acronym Suffix to be added to my given name.

Message 3 of 7

carlos_m_gil_p
Advocate
Advocate

Hello Brother how are you.
It does not work.
Open another option.


AutoCAD 2026
Visual Studio Code 1.99.3
AutoCAD AutoLISP Extension 1.6.3
Windows 10 (64 bits)

0 Likes
Message 4 of 7

scot-65
Advisor
Advisor
Accepted solution
Looking at your original code, the is_default is there
but not the is_cancel.

From what I remember, both of them have to be
somewhere inside the DCL.

Possibly another item is to add a return to the last line
(the cursor will go below the last line).

I have remove some redundant code:
[code]
Selectclose :dialog
{label="list";
spacer;
spacer;
:boxed_column {
:list_box {key="txtobjorg"; is_enabled=true; width=18; height=13;}
spacer;
}
spacer;
:button {key="canselobj"; label="Cancel"; is_default=true; is_cancel=true;}
spacer;
}
[/code]

???

Scot-65
A gift of extraordinary Common Sense does not require an Acronym Suffix to be added to my given name.

0 Likes
Message 5 of 7

carlos_m_gil_p
Advocate
Advocate

Hello Brother how are you.
Now if it works, I'll take your comments for future lisp.
Thank you.


AutoCAD 2026
Visual Studio Code 1.99.3
AutoCAD AutoLISP Extension 1.6.3
Windows 10 (64 bits)

0 Likes
Message 6 of 7

scot-65
Advisor
Advisor
Try this for more elegance:
:button {
key="canselobj";
label="&Cancel";
is_default=true;
is_cancel=true;
fixed_width=true;
alignment=centered;
}

Optional is to assign a width... especially if using
more than one button on a line (row). A value of 12.0
usually does the trick for all OK, Cancel and Help with
a spacer that is 2.0 units wide in between.
:row {fixed_width=true; alignment=centered;
:button... &OK
:spacer {width=2.0;}
:button... &Cancel
:spacer {width=2.0;}
:button... &Help
}

Scot-65
A gift of extraordinary Common Sense does not require an Acronym Suffix to be added to my given name.

Message 7 of 7

carlos_m_gil_p
Advocate
Advocate

Thanks brother.
Everyday I learn more.


AutoCAD 2026
Visual Studio Code 1.99.3
AutoCAD AutoLISP Extension 1.6.3
Windows 10 (64 bits)

0 Likes