Formating Text in a text box

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have the following statements
TextBox19.Text &= "ID" & ControlChars.Tab
TextBox19.Text &= "Requirement Name" & ControlChars.Tab
TextBox19.Text &= "Status" & ControlChars.Tab
TextBox19.Text &= "Owner" & ControlChars.NewLine

I want to Bold and Underline only the above text and not the information
that will be printed later below it.

Also when the columns get filled they dont align correctly how can I do that.

It currently looks like this
ID Requirement Name Status Owner
1 abcdef Draft John
2 uryeuyreuyrueyrueyruery Draft Amy
3 ytreytryetryetrye Accepted Carl

It want it to looks like this
ID Requirement Name Status Owner
only the above line should be BOLD
1 abcdef Draft John
2 uryeuyreuyrueyrueyruery Draft Amy
3 ytreytryetryetrye Accepted Carl


Please can anyone tell me how to do the formatting within a text box

Thank you

Amruta
 
You could consider using a richtextbox instead. That would give you a chance
to underline and bold the column headers. But you will probably end up with
e 'messy' column lign out, especially if the text values have different lengths.
Therefor I would suggest you use a datagridview: it offers al the features
you like (column alignment, bold, underline, etc).
 
Jos Roijakkers said:
You could consider using a richtextbox instead. That would give you a
chance to underline and bold the column headers. But you will probably end
up with e 'messy' column lign out, especially if the text values have
different lengths.
Therefor I would suggest you use a datagridview: it offers al the features
you like (column alignment, bold, underline, etc).
In my opinion, the ListView would work just fine for this. Instead of
bolding, you would get actual columns and a column header, but without the
need to have a "List" to bind with. It still works similar to the
DataGridView too :)

HTH,
Mythran
 
Jos Roijakkers said:
You could consider using a richtextbox instead. That would give you a
chance to underline and bold the column headers. But you will probably end
up with e 'messy' column lign out, especially if the text values have
different lengths.

I agree, but note that the 'SelectionTabs' property of the richtextbox can
be used to set the tabstops' positions.
 
Back
Top