Author Topic: Too long space in text attribute in DCL dialog  (Read 2174 times)

0 Members and 1 Guest are viewing this topic.

Coder

  • Swamp Rat
  • Posts: 827
Too long space in text attribute in DCL dialog
« 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.

Dlanor

  • Bull Frog
  • Posts: 263
Re: Too long space in text attribute in DCL dialog
« Reply #1 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;

efernal

  • Bull Frog
  • Posts: 206
Re: Too long space in text attribute in DCL dialog
« Reply #2 on: October 22, 2018, 02:29:17 PM »
Use
alignment=centered;
e.fernal

Coder

  • Swamp Rat
  • Posts: 827
Re: Too long space in text attribute in DCL dialog
« Reply #3 on: October 22, 2018, 02:32:03 PM »
Sorry, none of them worked as expected.  :no:

Dlanor

  • Bull Frog
  • Posts: 263
Re: Too long space in text attribute in DCL dialog
« Reply #4 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.

Coder

  • Swamp Rat
  • Posts: 827
Re: Too long space in text attribute in DCL dialog
« Reply #5 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.

Lee Mac

  • Seagull
  • Posts: 12914
  • London, England
Re: Too long space in text attribute in DCL dialog
« Reply #6 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;
}

Coder

  • Swamp Rat
  • Posts: 827
Re: Too long space in text attribute in DCL dialog
« Reply #7 on: October 22, 2018, 05:31:51 PM »
Wow that works great Lee.
Thank you so much.