Formating File output

I am saving data from a listbox into a .RTF file. How can I format the data to align to the right and format the text color

Thanks.




Answer this question

Formating File output

  • blitzy

    you can set the font style etc... using the SelectionFont property and applying it to the text selected. The same applies for the color - use the SelectionColor property and set the Color you like through its enumerator

    You can set the alignment of the text selected using the SelectionAlignment property, and set it to left/center/right.



  • GrahamY

    Also put a RichTextBox on the Form, Put text in it from the Listbox as you need it, There are very easy funtions available to format text through RichTextBox Control, call functions what you need and in last Call RichTextBox.Save(); to save all the Rich Text into a file.

    Cheers ;-)



  • Formating File output