TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: JohnK on April 15, 2005, 02:49:44 PM
-
I would like to make the "ok" button default so when i hit enter the dialog goes away. (Im horrible at DCL)
ibox : dialog {
key = "title";
: edit_box {
key = "eb1";
}
ok_cancel;
}
Any help would be appreciated.
-
is_default = true;
-
I was thinking allow_accept = true-false;
-
RTFM ............. :)
Programmable Dialog Box Reference
-
I think this is the sort of thing you're looking for :
My understanding is the allow_accept will only work if the control it is located in has focus when ENTER is pressed
texteditor : dialog {
label = "Edit Text";
initial_focus = "text_edit";
: edit_box {
label = "Text:";
key = "text_edit";
edit_width = 100;
edit_limit = 1536;
allow_accept = true;
}
ok_cancel;
}
-
Kerry, That looks like it will work perfectly. Thanx man. (Although the edit width is a bit big. :lol:)
...
Works awesome! Thanx Kerry.
-
Nice one Kerry.
Here is another way: http://www.theswamp.org/phpBB2/viewtopic.php?t=2715