Skip to content
⌘ NSIS Forum Archive

How to turn off word wrap in TEXT control?

9 posts

pengyou#

How to turn off word wrap in TEXT control?

After updating my MUI-based installer to work with the 2.0b4 release, I found that one of my custom pages no longer worked properly.

The custom page has a multiline text control. With the old NSIS compiler, long text strings did not wrap but with the new compiler they now wrap.

I can stop the text from wrapping by enabling horizontal scrollbars but I do not want to do this.

Is it possible to turn off word wrapping on a multiline text control which does not have scrollbars?
eccles#
Gah. I knew this would happen 🙁 The change in behaviour seemed to make sense at the time but I should have known there'd be cases where it wouldn't be right. I'm working on InstallOptions at the moment so while I'm in there I'll add a NOWORDWRAP flag (or something like it) so that the behaviour can be controlled manually.
pengyou#
Thanks for adding the NOWORDWRAP flag so quickly - the new DLL solves my problem (tested on Win98SE).
eccles#
Heh! Thank's for testing it so quickly... even before I'd got around to letting you know I'd done it! 😁
pengyou#
As an experiment I tried using a Right-To-Left language in my installer and found a problem with the new NOWORDWRAP flag.

When I tried to run my installer with this new language selected, I found that the new NOWORDWRAP flag did not have any effect on the multi-line read-only text controls on my custom pages. The text wraps when using a RTL language but does not wrap when using a LTR language.

I'm using InstallOptions.dll v1.76 from the 19 December 2003 (20:44 GMT) CVS snapshot.

This is NOT a problem for me at the moment as my installer only uses Left-To-Right languages (I just wanted to see how the new "RTL" setting for the custom page INI file worked).
kichik#
I can't reproduce this. I have changed test.nsi to be RTL, added NOWORDWRAP|DISABLED on the last field and it showed right. Can you please attach an example script?
pengyou#
Attached is a modified version of test.ini. When the InstallOptions\test.nsi script is compiled with RTL=0 the text control shows:
Multiline wit
edit...
and when RTL=1 the text control shows:


Multiline
with very
This is on Win98SE system with 19 December (20:44 GMT) CVS snapshot.
kichik#
I can't reproduce this on my Windows 98 - Hebrew localized, even with your file. Maybe it's something with WS_EX_RTLREADING and systems that don't support it... Can you test it with 1.73 which didn't have WS_EX_RTLREADING?
pengyou#
I tried rebuilding with 1.73 but it made no difference. I also tried everything from 1.73 to 1.76 with no luck.

Attached is a zip file with two screen shots showing the problem and a test.exe built using 1.76 and RTL=1 in the INI file.

Does the test.exe I built work on RTL Windows?