TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: Coder on October 22, 2018, 12:49:22 PM

Title: Too long space in text attribute in DCL dialog
Post by: Coder on October 22, 2018, 12:49:22 PM
Hello everyone,

I wonder why there is a long space at the end of the alert message!
Can the width of the dialog be almost at the end of the last word of the message?


Code: [Select]
"testme : dialog { label = \"Test\"; fixed_width = true;
        : text { label = \"This is just an example to show an alert message to users.\";}
  ok_only;}"
Thank you.
Title: Re: Too long space in text attribute in DCL dialog
Post by: Dlanor on October 22, 2018, 02:21:46 PM
I'm no expert, but since you aren't setting an actual width, perhaps you're invoking a default one. So try removing

Code: [Select]
fixed_width = true;
Title: Re: Too long space in text attribute in DCL dialog
Post by: efernal on October 22, 2018, 02:29:17 PM
Use
alignment=centered;
Title: Re: Too long space in text attribute in DCL dialog
Post by: Coder on October 22, 2018, 02:32:03 PM
Sorry, none of them worked as expected.  :no:
Title: Re: Too long space in text attribute in DCL dialog
Post by: Dlanor on October 22, 2018, 04:05:09 PM
Code: [Select]
testme : dialog { label = "Test";
        : text { label = "This is just an example to show an alert message to users."; alignment = centered;}
  ok_only;}

This worked for me, albeit not exactly what i think you wanted.
Title: Re: Too long space in text attribute in DCL dialog
Post by: Coder on October 22, 2018, 04:13:19 PM
Code: [Select]
testme : dialog { label = "Test";
        : text { label = "This is just an example to show an alert message to users."; alignment = centered;}
  ok_only;}

This worked for me, albeit not exactly what i think you wanted.
That divides the distance on the two sides which is not quite right as long as I have another line of text and they won't look good.
Title: Re: Too long space in text attribute in DCL dialog
Post by: Lee Mac on October 22, 2018, 05:23:28 PM
Use the following:
Code: [Select]
test : dialog
{
    label = "Test";
    : text
    {
        width = 45.5;
        value = "This is just an example to show an alert message to users.";
    }
    ok_only;
}
Title: Re: Too long space in text attribute in DCL dialog
Post by: Coder on October 22, 2018, 05:31:51 PM
Wow that works great Lee.
Thank you so much.