Silverfrost Forums

Welcome to our forums

Word wrap

14 Apr 2016 1:51 #17417

It would be incredibly useful to have a word wrap feature, either as a basic option in a simple i=winio@ ('.....') call or as an option for %eb

As it is, I haven't found any alternative to writing text as fixed-length lines which don't necessarily fill the full width of a window - since that width is generated at run-time depending on the particular set of controls that are being used.

Example: http://www.vmine.net/join_v.jpg[/img]

It would be much neater if the block of text at the top could be output as a single string, automatically word-wrapped to the width of the window.

Maybe there's a way to do this (other than going to VS and using Visual Clearwin) but I haven't found it!

14 Apr 2016 3:48 #17420

You could try %re without a horizontal scroll.

14 Apr 2016 4:39 #17421

Thanks - that certainly goes some way to what is needed. Seems to do the word wrap OK. However the width and height of the %re box seem to be fixed. This means that when the text is very short, there is a lot of blank space in the box. Also, I have set the width to a reasonable maximum, but the required width can be different for different applications.

http://www.vmine.net/delete_v.jpg[/img]

However, there are a limited number of options for both width and depth, so this is livable with. I don't suppose there is any way to use integer variables in place of M and N in **winio@('%N.Mre[options]', buffer) **is there ?

Anyway, many thanks for the workaround!

14 Apr 2016 6:31 #17422

In format codes, N and M can usually be replaced by * (i.e. %*.*re in this case) and the integer values are then provided in the argument list (before the associated character argument in this case).

In some contexts it is helpful to construct the format string for winio@ dynamically in the program by an internal WRITE to a character variable.

15 Apr 2016 10:37 #17423

Excellent - thanks for that, Paul. Internal write of the format string fixed it. Something I hadn't done before but now I see how it could help in a few other situations too!

I needed to set the font to FixedSys so I could calculate the correct number of lines (with Arial, the text looked better but took less space so there were a few blank lines!). 😄

15 Apr 2016 12:10 #17424

Blimey Paul. Where does it say that in the documentation?

Eddie

15 Apr 2016 4:15 #17427

It was in my head so I must have read/written it somewhere but when I came to look I could not find it either. I am wondering if a few links in the help file have got lost on the way.

16 Apr 2016 11:25 #17432

I know that there's a lot on what with the 64-bit version, keeping pace with visual studio, fixing bugs, coping with whatever Microsoft throws up in terms of changes to Windows, and all the rest of it, so I am completely understanding about priorities and all that. I also understand that printing documentation is an expensive overhead. I had a look at the costs of small runs of properly bound booklets and my goodness, aren't they expensive.

When I look at the online documentation (and by that I include web, the help file, the PDFs of old documents and the enhancements file) I know that if there is something that I know already exists, that I might have used but don't really remember the details, then if I'm prepared to put in the time and effort I can find it. Well mostly. I'm also someone who has taken the time to read the documentation in advance of having specific needs in my programs. But I'll never be able to find something that simply isn't there!

The help documentation isn't always very searchable, it is often not complete, and it definitely doesn't often list some of the deficiencies or limitations. As to the 5000 separate choices, I'm glad I'm not running that particular bit of software. But it might have been useful to point out in the documentation that the list was limited to 64K characters. Perhaps yet another file on this site or in the distribution listing known limitations and 'issues' could be at least in part an answer.

Eddie

16 Apr 2016 3:26 #17433

Thanks for the feedback Eddie. Your support is much appreciated.

23 Apr 2016 1:04 #17446

The use of asterisks is described under Win32 platform->ClearWin+->Input and output->Data output. This section relates to %wd etc.. It should say that the same principle also applies to %rd etc..

The other place to look is Win32 platform->ClearWin+->Format windows->Advanced use of format windows.

Please login to reply.