Textbox.Multiline: Formatting appended text per-line

Ask your Windows PowerShell-related questions, including questions on cmdlet development!
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Locked
User avatar
StupidSexyFlanders
Posts: 107
Joined: Sun Nov 27, 2011 9:22 am

Textbox.Multiline: Formatting appended text per-line

Post by StupidSexyFlanders » Mon Oct 08, 2012 9:33 am

I am using a forloop to add information (using appendtext) to a multiline textbox. Can the text be formatted differently on a per-line basis? For example, could I leave the first line at the default formatting and make the next line bold?

$outputWindow.AppendText("Default text format")
$outputWindow.AppendText("Bold text")

Whenever I define formatting per-line it changes all the text in the box to the formatting of the most recently added line.
Mike

User avatar
jvierra
Posts: 13808
Joined: Tue May 22, 2007 9:57 am
Contact:

Textbox.Multiline: Formatting appended text per-line

Post by jvierra » Fri Oct 12, 2012 3:14 pm

No - try using an RichText Control which allows formatting.

Locked