PDA

View Full Version : Newline issue in Text Resource



was
02-10-2022, 07:44 AM
I have some text in a variable %UGTEXT1% which is set at runtime. I want to add this to the 'Ready to Install dialog's Resource DLG_READYTOINSTALL_TEXT before the standard text 'If you want to review or change any of your installation settings, click Back. Click Cancel to exit the program.' The following text set in 'Edit Text Resource Properties' displays ok without more than one newline:

%UGTEXT1%\nIf you want to review or change any of your installation settings, click Back. Click Cancel to exit the program.

but adding more that one newline as follows only displays the %UGTEXT% text and not the standard text:

%UGTEXT1%\n\n\n\nIf you want to review or change any of your installation settings, click Back. Click Cancel to exit the program.

It appears that only one newline \n can be added? Am I doing something wrong?

Andrew

was
02-15-2022, 03:14 AM
Can this be reproduced? Is it a bug? If not, how can I combine a variable's text with other text in a 'Ready to Install dialog's Resource DLG_READYTOINSTALL_TEXT' with variable numbers of newlines?

Andrew

was
02-16-2022, 10:58 AM
I see in Help that variables have a 260 character limit, but I can't find anything regarding a Text Resource limit. It looks as though I will have to have a separate dialog Text Resource for each separate text variation eg, DLG_READYTOINSTALL_TEXT_1, DLG_READYTOINSTALL_TEXT_2 etc and not use variables. I see that I can enter many lines of text in the Install dialog's Resource DLG_READYTOINSTALL_TEXT' value field, but it is truncated at runtime to only 3 lines! Not sure why that is happening?

Later: How do I select text resource DLG_READYTOINSTALL_TEXT_1 or DLG_READYTOINSTALL_TEXT_2 based on a condition?

Andrew

was
02-18-2022, 03:26 AM
As a new subscriber to SB (from Wise 9), I'm very disappointed that I haven't had a response to this very basic question. I assume I must be doing something wrong but, after more than a week investigating this, I can't figure out what the problem is. Can anyone point out where I may be going wrong please?

linder
02-19-2022, 12:51 PM
Andrew,

this is a free online forum. Did you send this support request to the official support e-mail (support [at] lindersoft [dot] com)? Support always answers within 24-hours! But I do not see any ticket for this (so I think you did not contact our support).

I have created a ticket now.

Friedrich

linder
02-19-2022, 01:17 PM
Andrew,

you have several options on how to handle what you are trying to do. I have created a simple project demo for you (custom "Ready to Install" dialog option):

https://www.setupbuilder.com/projects/CustomReadyToInstall.zip

Does this help?

Friedrich

was
02-19-2022, 01:53 PM
Thanks Friedrich, I wasn't aware of the proper support arrangements and apologies for not using them; I will in future. Thanks for the project and, yes, it does help. I see that you have to use custom dialogs with static text controls to display larger amount of runtime selectable text in a dialog and I'll incorporate that technique in my app.

As an aside, I'm now using a number of the SB built-in functions which I find very useful indeed compared to what is available in Wise. I find SB very powerful and there's nothing I can't do with a small amount of scripting - and a bit of digging in the Help.

Thanks again,

Andrew