Toggle drop down boxes "on & o
Hey guys and gals...Been a while since I visited.
I need some direction on how the toggle selections are done in the routine posted HERE.
The Buzzard and CAB were a big help with the creation of this, so if you two could chime in, it would be quite helpful.
Glad to be back!
-SlimP
Hey Slimp,
Been a while.
Below is a simple lisp with a Toggle defaulted to on.
Just unclick or click the toggle and click OK to read
the command prompt responce.
Enjoy,
The Buzzard
Toggle.dcl
MAIN : dialog { label = "Toggle"; : boxed_column { label = "Snap Angle"; : toggle { label = "On/Off"; key = "TOG1"; } } : boxed_column { label = "Control Buttons"; : button { label = "&Proceed"; key = "accept"; width = 18; fixed_width = true; alignment = right; is_default = true; } : button { label = "&Exit Program"; key = "cancel"; width = 18; fixed_width = true; alignment = right; is_cancel = true; } } }
Toggle.lsp
(defun C:TOGGLE (/ TOG1$) (or T:OG1$ (setq T:OG1$ "1")) (setq DCL_ID (load_dialog "TOGGLE.dcl")) (if (not (new_dialog "MAIN" DCL_ID)) (cond (( This lisp will operate two functions to give you another idea how to use the toggle.
TOGGLE2.DCL
MAIN : dialog { label = "Toggle2"; : boxed_column { label = "Snap Angle"; : toggle { label = "On/Off"; key = "TOG2"; } } : boxed_column { label = "Control Buttons"; : button { label = "&Proceed"; key = "accept"; width = 18; fixed_width = true; alignment = right; is_default = true; } : button { label = "&Exit Program"; key = "cancel"; width = 18; fixed_width = true; alignment = right; is_cancel = true; } } }
TOGGLE2.LSP
(defun C:TOGGLE2 (/ TOG2$) (or T:OG2$ (setq T:OG2$ "1")) (setq DCL_ID (load_dialog "TOGGLE2.dcl")) (if (not (new_dialog "MAIN" DCL_ID)) (cond (( slimp,
I took another look at your question, And I think you might be referring to the operation of mode_tile. If so, I think CAB would be able to explain it better since he wrote those portions of the program for you. I use it also, But a slight bit different than the way he used it in your program. If he does not get back to you, I will try the best I can to explain what he did. Let me know if this is what you are looking to do.
At first glance from what I can see due to the amount of action_tiles that would have been required he used a global variable list and in turn this reduced the number of action_tiles needed. This is alot of information for me to try to take in at once. Its very amaziing to me how this was done, But at the same time confusing as well. It is probably one of the reasons why I shy away from global lists. At the beginning when you were working on this program, I was going in a more simpler but longer direction.
I appreciate the idea that you gave me any credit for this, However this was all CAB's idea and a much better way to program although more complex for me to deal with. I think it would be best to contact CAB by PM to see if he can shed some light on this for you. I can only touch base with some of whats going on here and not give you a very detailed explaination. I doubt many others who were not involved in that thread at the time may want to go here although I am not certain. I will try my best at it.
But that up to you.
The Buzzard
页:
[1]