TheSwamp
Code Red => Visual DCL Programming => AutoLISP (Vanilla / Visual) => OpenDCL => Topic started by: mr_nick on June 21, 2012, 11:41:34 AM
-
Is there a way of creating a list of checkboxes via code rather than hardcoding them into a dialog? I want to create a selection list by passing a list of strings, as per you do with a listbox, but to use an array of checkboxes instead.
I know I can use a multi/toggle listbox but when I did that, the first comment I received back was along the lines of 'Yeah, it works but damn - it's ugly'.
-
All controls have a visibilty property accessible via lisp. You'll still need to build the form in the OpenDCL editor and use the visibilty property to show / hide the appropriate number of controls. You can also re-size the form via lisp.
I have done this before so I know it's possible - but not easy.
jb
-
Perhaps a multiple selection list box or list view control would work instead of using check boxes.
-
OK, no straightforward approach then other than a listbox. Having tried that one already, I know it's simple enough but it met with some 'unfavourable' comments about it's appearance.
I'll have a fiddle and see what I can come up with.
Thanks.
-
Is standard DCL an option?
(defun c:test
( / *error* d e f h i l s
)
)
)
)
)
)
)
(write-line "test : dialog { label = \"Choose Objects\"; spacer;" d
) )
)
)
)
)
)
)
)
-
Is standard DCL an option?
Most definitely is. I still have one or two routines which use DCL where a dialog needs to be created on the fly in this manner - albeit in very simplistic ways. I must admit, I do tend to overlook DCL nowadays due to the comparitive simplicity of ODCL but I will certainly revisit it after seeing your example.
Thanks for the inspiration.
-
If you must have check boxes, you could use a grid control. The grid control has some idiosyncracies that may make it a bit unwieldy, but it would work in theory.
-
mr_rick,
In the other thread: reactor causing fatal error, what exactly were you wanting to do? If you want to automatically control the layer the vport goes on why not just edit the mvsetup.lsp?
jb
-
Is standard DCL an option?
Most definitely is. I still have one or two routines which use DCL where a dialog needs to be created on the fly in this manner - albeit in very simplistic ways. I must admit, I do tend to overlook DCL nowadays due to the comparitive simplicity of ODCL but I will certainly revisit it after seeing your example.
Thanks for the inspiration.
You're very welcome, hope it helps :-)
-
mr_rick,
In the other thread: reactor causing fatal error, what exactly were you wanting to do? If you want to automatically control the layer the vport goes on why not just edit the mvsetup.lsp?
jb
This topic is not linked to the reactor code. And to that end MVSETUP was not linked to the reactor code, it was purely incidental that somebody in the office started reporting repeated crashes when he was using MVSETUP.
But that is another tale, for another thread...
-
If you must have check boxes, you could use a grid control. The grid control has some idiosyncracies that may make it a bit unwieldy, but it would work in theory.
Having had a bit of a play around, the grid control seems to provide the right degree of flexibilty and appearance for my needs but I'm a little concerned by your warning Owen. Would you care to elaborate of what these idiosyncracies are so I know what to look out for or avoid?
-
I was referring to possibly undesirable display elements and the editing architecture (i.e. you toggle a checkbox by "editing" its cell, which toggles the image for the cell - not as straightforward as a checkbox control).