Bon 12 Posted September 6, 2009 Can someone explain to me how I can insert line breaks into control text? So I have a line in a script looks like ctrlSetText [_idc, "Text which is just too long to fit in the dialog appropriately, best would be to insert a line break some words before...."]; I tried the following: Changed the textbox type to CT_STRUCTURED_TEXT as it is written here in the biki. Then tried both _control ctrlSetStructuredText parseText "First line<br/>Second line" as well as I tried _control ctrlSetStructuredText composeText["First Line", linebreak, "Second line"]; but did not succedd yet. Any help would be appreciated. In both cases the text is not shown. Its no syntax errors (all arguments and parameters are of the needed type), so it must be just the wrong way. Share this post Link to post Share on other sites
Binkowski 26 Posted September 6, 2009 \n\n Adds breaks to codes like that. I've used it in mission intro's before...hope that helps! Share this post Link to post Share on other sites
Bon 12 Posted September 6, 2009 \n does not work with ctrlSetText. But thanks. Share this post Link to post Share on other sites
Deadfast 43 Posted September 6, 2009 Does it work without the <br/> tag? Share this post Link to post Share on other sites
Bon 12 Posted September 6, 2009 Well, as much as I understood it SHOULD work with <br/> when the text is of Structured Text type. But that I already tried as I mentioned above, unfortunately without success. Share this post Link to post Share on other sites
i0n0s 0 Posted September 6, 2009 This code should work on a structured text type. Are you sure you have one? Share this post Link to post Share on other sites
Deadfast 43 Posted September 6, 2009 Well, as much as I understood it SHOULD work with <br/> when the text is of Structured Text type. But that I already tried as I mentioned above, unfortunately without success. You didn't answer my question, did you try changing the text to anything else without the line break just to see if that works? Share this post Link to post Share on other sites
Clayman 20 Posted September 7, 2009 Add this to your control: style = ST_MULTI; lineSpacing = 1; Share this post Link to post Share on other sites
Bon 12 Posted September 7, 2009 @Deadfast: Sorry, I read "with" instead of "without", was just too late for me yesterday. @Clayman: That did the trick. Vielen Dank nach Bremen. Share this post Link to post Share on other sites
2nd ranger 282 Posted November 11, 2011 _control ctrlSetStructuredText parseText "First line<br/>Second line" How do you define what _control is in a script? I try the idc and get an error. Share this post Link to post Share on other sites