HelpText - Multiline output - Format possible?

Feb 24, 2012 at 3:45 PM

Hi, is it somehow possible to format the multiline output of an Option HelpText?

The example app contains this definition:

            [OptionList("o""operators", Separator = ';',
                HelpText = "Operators included in processing (+;-;...)." +
                " Separate each operator with a semicolon." +
                " Do not include spaces between operators and separator.")]

But the output is shown like this:

 o, operators    Operators included in processing (+;-;...). Separate each
                 operator with a semicolon. Do not include spaces between
                 operators and separator.


I would like to get somthing like this:

 o, operators    Operators included in processing (+;-;...).
Separate each operator with a semicolon.
Do not include spaces between operators and separator.

Thx
Coordinator
May 13, 2012 at 4:47 PM
Hi,
when you define the text you could use '+' string operator (compiler will merge strings for you in output binary).

From various versions ago the library automatically wraps HelpText class output so you don't need to force any newline.

Anyway I think that you could add "\n" inside HelpText property, but never tried before...

Regards,
Giacomo

2012/2/24 Pitterling <notifications@codeplex.com>

From: Pitterling

Hi, is it somehow possible to format the multiline output of an Option HelpText?

The example app contains this definition:

            [OptionList("o", "operators", Separator = ';',
                HelpText = "Operators included in processing (+;-;...)." +
                " Separate each operator with a semicolon." +
                " Do not include spaces between operators and separator.")]

But the output is shown like this:

o, operators Operators included in processing (+;-;...). Separate each
operator with a semicolon. Do not include spaces between
operators and separator.


I would like to get somthing like this:

o, operators Operators included in processing (+;-;...).
Separate each operator with a semicolon.
Do not include spaces between operators and separator.

Thx

Read the full discussion online.

To add a post to this discussion, reply to this email (commandline@discussions.codeplex.com)

To start a new discussion for this project, email commandline@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


May 14, 2012 at 11:16 AM

Hi,

the automatically wrapping of HelpText does not really work well. I also tried the \n which was not working for me.

I had to specify SPACES ... carefully and retrying again again to get the format i want.

thx Peter

Aug 8, 2012 at 11:48 AM
Edited Aug 8, 2012 at 11:49 AM

I have the same issue. Is it possible to force this kind of wrapping?

Coordinator
Feb 17, 2013 at 10:52 AM
It's important understand how it works. It operates on HelpText::MaximumDisplayWidth.

It covered by unit tests. Give a look:
https://github.com/gsscoder/commandline/blob/master/src/tests/Text/HelpTextFixture.cs

Giacomo