Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How do make my DCL box as compact as possible?

3 views
Skip to first unread message

Link Davis

unread,
Mar 25, 1998, 3:00:00 AM3/25/98
to

I'm new to DCL and having some trouble controlling the width of the items,
even when I enter one or all of the fixed_width options.

Also, if you will, please staighten me out on the alignment option too.

Note: I supplied the code so that if you have Vital/Visual Lisp you can use
the preview option, not because I expect you to fix the whole thing. I want
the box to be as compact as possible. How do I get there from here?


Thanks!


dcl_TestBox : default_dcl_settings { audit_level = 3; }
TestBox : dialog {
label = "Draw Panels in Plan View" ;
//>
: boxed_row {
label = "Draw Plan View Walls";
key = "col2";
children_fixed_width = true ;
//>>
: boxed_radio_column {
label = "Start Point";
key = "start-pt";
children_fixed_width = true ;
: radio_button {
label = "Pick Point";
key = "pick-start-point";
fixed_width = 15 ;
}
: radio_button {
label = "Use Last Pick Point";
key = "use-last-start-pt";
fixed_width = 15 ;
}
: radio_button {
label = "Enter coorinates";
key = "enter-start-coords";
fixed_width = 15 ;
}
//>>>
: radio_row {
key = "x1-y1-row1" ;
children_fixed_width = true ;
: text {
key = "X1-txt" ;
label = "Start Point X" ;
alignment = right ;
fixed_width = 12 ;
}
: edit_box {
key = "X1" ;
alignment = left ;
fixed_width = 6 ;
}
}
//<<<
//>>>
: radio_row {
key = "x1-y1-row2" ;
children_fixed_width = true ;
: text {
key = "Y1-txt" ;
label = "Start Point Y" ;
alignment = right ;
fixed_width = 12 ;
}
: edit_box {
key = "Y1" ;
alignment = left ;
fixed_width = 6 ;
}
} //<<<
} //<<
//>>
: boxed_radio_column {
label = "End Point";
key = "end-pt";
children_fixed_width = true ;
: radio_button {
label = "Pick Point";
key = "pick-end-point";
fixed_width = 15 ;
}
: radio_button {
label = "Use Last Pick Point";
key = "use-last-end-pt";
fixed_width = 15 ;
}

: radio_button {
label = "Enter coorinates";
key = "enter-end-coords";
fixed_width = 15 ;
}
//>>>
: radio_row {
key = "x2-y2-row1" ;
children_fixed_width = true ;
: text {
key = "X2-txt" ;
label = "End Point X" ;
alignment = right ;
fixed_width = 11 ;
}
: edit_box {
key = "X2" ;
alignment = left ;
fixed_width = 6 ;
}
}
//<<<
//>>>
: radio_row {
key = "x2-y2-row2" ;
children_fixed_width = true ;
: text {
key = "Y2-txt" ;
label = "End Point Y" ;
alignment = right ;
fixed_width = 11 ;
}
: edit_box {
key = "Y2" ;
alignment = left ;
fixed_width = 6 ;
}
} //<<<
} //<<
} //<
spacer_1 ;
ok_cancel ;
}

SCOTT D. THACKER

unread,
Mar 25, 1998, 3:00:00 AM3/25/98
to

Link,
Didn't have time this morning to actually 'run' your dialog box, but
noticed the following things you should try:

For your 'Boxed Rows' , 'Boxed Columns' , etc.
use fixed_width = true;

For your 'Children' use width = 15; (or whatever width you want)

Hope this helps a little.

--
Scott Thacker
Thacker Development Company Ltd.
**Golf Course Design and Development Services.**
sdth...@msn.com
Link Davis wrote in message <6fb2g7$6e...@adesknews2.autodesk.com>...

Stephen Tate

unread,
Mar 25, 1998, 3:00:00 AM3/25/98
to

Link

If you're going to do DCL I strongly recommend DCG. It's really easy to
build them (within AutoCAD) and far quicker that writing out the code in
Visual LISP.

Let me know if you're interested and I'll email a shareware version.

Stephen Tate

Jon Fleming

unread,
Mar 25, 1998, 3:00:00 AM3/25/98
to

Well, let's see.

You're calling almost everything a radio column or radio row, and that's
pretty unusual. Generally, only radio buttons appear in a radio column or
row. Also, you always want to have a key for your radio _column_ (or row) as
well as for the individual buttons. This allows you to get the value of the
radio column by using get_tile with the key of the radio column (the result is
the key of the selected button). It also allows you to set which button is
initially picked by using set_tile with the key of the radio column and the
key of the button you want selected.

You'll find that labeling your edit boxes uses a tiny bit less space than
using text tiles to label them.

Although it isn't of much use in this example, you can create rows or columns
just to be able to specify the type of alignment you want. You can only
specify the horizontal alignment if the tile is a child of a column. You can
only specify vertical alignment for a tile that's a child of a row. So how do
you specify horizontal alignment for a tile that's a child of a row? Create a
fake column!

:row {
:column {
:edit_box {
alignment = right;
.
.
.
}
}
}

Using "fixed_width = <number>" appears to be accepted, but the documentation
states that the possible values for fixed_width are "true" or "false". To
specify a width, use the "width" attribute.

You can reduce the area of this box a little by using short labels for the
edit boxes and putting them beside each other. Of course, I would attach an
action routine to each radio column that disables the edit boxes unless the
"Enter Coordinates" radio button is picked.

If you're really scraping for less space, you can take advantage of what I
believe is undocumented behavior (and which may change in the future): a
non-boxed row or column with a label gets boxed, but uses less space than a
boxed row or column with the same label. The boxing doesn't look as good.

So, something like this:

dcl_TestBox : default_dcl_settings { audit_level = 3; }
TestBox : dialog {
label = "Draw Panels in Plan View" ;

: row {


label = "Draw Plan View Walls";
key = "col2";
children_fixed_width = true ;

: column {


label = "Start Point";
key = "start-pt";
children_fixed_width = true ;

:radio_column {
key = "StartPointRadio";


: radio_button {
label = "Pick Point";
key = "pick-start-point";
}

: radio_button {
label = "Use Last Pick Point";
key = "use-last-start-pt";
}

: radio_button {
label = "Enter coordinates";
key = "enter-start-coords";
}
}
:row {
: edit_box {
key = "X1" ;
label = "X:";
width = 6 ;
}
: edit_box {
key = "Y1" ;
label = "Y:";
width = 6 ;
}
}
}
: column {


label = "End Point";
key = "end-pt";
children_fixed_width = true ;

:radio_column {
key = "EndPointRadio";


: radio_button {
label = "Pick Point";
key = "pick-end-point";
}

: radio_button {
label = "Use Last Pick Point";
key = "use-last-end-pt";
}

: radio_button {
label = "Enter coordinates";
key = "enter-end-coords";
}
}
:row {
: edit_box {
key = "X2" ;
label = "X:";
alignment = right ;
width = 6 ;
}
: edit_box {
key = "Y2" ;
label = "Y:";
alignment = right ;
width = 6 ;
}
}
}
}
spacer_1;
ok_cancel ;
}

jrf

In article <6fb2g7$6e...@adesknews2.autodesk.com>, Link Davis wrote:
> From: "Link Davis" <link...@sprintmail.com>
> Newsgroups: autodesk.autocad.customization
> Subject: How do make my DCL box as compact as possible?
> Date: Wed, 25 Mar 1998 08:00:29 -0600

Link Davis

unread,
Mar 26, 1998, 3:00:00 AM3/26/98
to

Many thanks to all for the excellent help!

Devin Currie

unread,
Mar 27, 1998, 3:00:00 AM3/27/98
to

hi link. :-) went through your DCL. found several error in your logic. as jon stated,
radio_box/radio_column/radio_row are normally assign to radio_button. you can check the
difference btwn column vs. radio_column and such by looking up its definition in the
base.dcl.

it appears to me that you do not fully understand the concept of "children_<whatever>"
since you had overuse it in your program.

whenever you use children_ attributes, you affect everything within the *column/*row
depending on where you insert it. for example,
rather than using fixed_width = true for each tile, you can use children_fixed_width =
true to affect all tiles within a cluster. where grouped tiles in rows or columns are
known collectively as "clusters" or "subassemblies". *row/*column/dialog are treated as
single tile.

for your record,

children_alignment = <position>;

specifies the default alignment for all tiles in a cluster.

for column, possible <postion> values are left, right, or centered (default: left).
for row, possible values are top, bottom, or centered (default: centered).

children_fixed_height = true-false; <default: false>

specifies the default height for all tiles in a cluster.

children_fixed_width = true-false; <default: false>

specifies the default width for all tiles in a cluster.

important: use the fixed_ attributes with discretion. inconsistent overriding of default
results in inconsistent layouts.

here's a *modified* version of your DCL. i had problem getting rid of the extra spaces on
the right side of both column. perhap, somebody could explain this phenomenon as i had
been pulling my hair out on this one....

dcl_TestBox : default_dcl_settings { audit_level = 3; }
TestBox : dialog {
label = "Draw Panels in Plan View" ;

: boxed_row {


label = "Draw Plan View Walls";

: boxed_column {
label = "Start Point";
children_fixed_width = true;
: radio_column {


: radio_button {
label = "Pick Point";

key = "pick_start_point";
}
: radio_button {
label = "Last Pick Point";
key = "use-last-start-pt";
}
: radio_button {
label = "Enter coorinates";
key = "enter-start-coords";
}
}
: row {
spacer;
: column {
spacer;
: text_part {
label = "Start X :";
}
spacer_1;
: text_part {
label = "Start Y :";
}
spacer;
}
: column {
: edit_box {
edit_width = 6;
key = "X1" ;
}
: edit_box {
edit_width = 6;
key = "Y1" ;
}

or you can use the one below but neither the edit_box would align up with each other
vertically. you could use spaces in the label and "eyeball" it to make it "appear" aligned
up correctly but personally i dont recommend this method.

// : edit_box {
// label = "Start X :";
// key = "X1" ;
// }
// : edit_box {
// label = "Start Y :";
// key = "Y1" ;
// }
}
}
spacer;
}
: boxed_column {
label = "End Point";
children_fixed_width = true;
: radio_column {


: radio_button {
label = "Pick Point";

key = "pick_end_point";
}
: radio_button {
label = "Last Pick Point";
key = "use-last-end-pt";
}
: radio_button {
label = "Enter coorinates";
key = "enter-end-coords";
}
}
: row {
spacer;
: column {
spacer;
: text_part {
label = "End X :";
}
spacer_1;
: text_part {
label = "End Y :";
}
spacer;
}
: column {
: edit_box {
edit_width = 6;
key = "X2" ;
}
: edit_box {
edit_width = 6;
key = "Y2" ;
}
// : edit_box {
// label = "End X :";
// key = "X2" ;
// }
// : edit_box {
// label = "End Y :";
// key = "Y2" ;
// }
}
}
spacer;
}
}
spacer;
ok_cancel;
}

FYI,

you can use either mnemonic or the shorthand "&" to provide keyboard shortcut to a tile.
ie.

label = "Link Davis";
mnemonic = "L";


or (my preference),

label = "&Link Davis";

pressing "L" on your keyboard would set focus to that tile.

--
Devin Currie
dscu...@canuck.com


Link Davis

unread,
Mar 28, 1998, 3:00:00 AM3/28/98
to

Terrific help from everyone!

Thanks. I hope I can return the favor.

0 new messages