DCL Text Alignment

I have a lisp routine (Al's Steel Mill) that I am running in Bricscad V12.1.7.  Everything works as expected except for the positioning of some of the text elements that are within a row, which is within a boxed column.  I have attempted to assigning a width, but that doesn't really help, it just makes things wider but doesn't change the alignment of the text.  Here is a screen shot, any ideas?

Comments

  • Here is an image with a box around the area in question.
    imagedialog.jpg
  • Scott,
    I downloaded this script some time ago, so I had a quick view at the dcl - it looks completely fine to me, so maybe it is worth filing a SR. But I won't do so, since I'm not really using this. If you just want to make the truncated text visible, you could append a spacer to each row, like this:
    [code]: boxed_column {
                label = "Shape Dimensions";
                            :row {
                :text {    label = "Depth:";}
                :text { is_bold = true;
                                    key = "depth";}
                            spacer_0;
                }
                :row {
                :text {    label = "Web thk.:";}
                :text { is_bold = true;
                                    key = "web";}
                            spacer_0;
                }
                :row {
                :text {    label = "Width:";}
                :text { is_bold = true;
                    key = "width";}
                            spacer_0;
                }
                :row {
                :text {    label = "Flg. Thk.:";}
                :text { is_bold = true;
                                    key = "flange";}
                            spacer_0;
                }             
                :row {
                :text {    label = "K Dim.:";}
                :text { is_bold = true;
                    key = "k_dim";}
                            spacer_0;
                }
            }[/code]

    This works on linux and should work on windows, too. The text justification looks broken, though - I don't remember enough dcl to fix this...
  •  Thanks!  WIll work until the support request is filled.
  • Two things are important here:
    1
    This:
    [code]:text {label = "Abcdef";}[/code]
    Is wider than this:
    [code]:text {value = "Abcdef";}[/code]

    2
    But the main problem is that the 2nd text within each row is empty when the dialog is being generated leading to the first text 'hogging' all the available row width. Supplying a fixed width for the second text solves this.
    [code]:row {
      :text {value = "Depth:";}
      :text {key = "depth"; fixed_width = true; width = 5;}
    }[/code]
  • And a third point...
    To get the texts to line up you have to supply a fixed width for both the first and the second text. Or use alignment = right; on the second text.
    [code]:row {
      :text {value = "Depth:"; fixed_width = true; width = 9;}
      :text {key = "depth"; fixed_width = true; width = 9;}
    }[/code]
  • Thanks, Roy
    that's really a comprehensive solution (probably shouldn't have posted mine...). Another way to solve the alignment issue would be to nest another row with two columns in the boxed row (doesn't seem to deteriorate performance, but needs the same amount of typing).
    But the question is still: does AutoCAD also truncate the second text, or is it smarter (readjusting when values get filled in)?

    Anyway, on linux this script is an interesting test case - clicking the cancel button crashes Bricscad, so does clicking on 'Pipe STD' - no such problems on windows?
  •  Hi Knut:

    No crashes when I try what you suggest - it is stable on Windows - I am running V12.1.7 on Windows 7.

    Hi Roy:

    Thank you for the tip..  I was trying the alignment stuff but it wasn't working, but I was using alignment  = left;
This discussion has been closed.