G
Guest
Hi all
I have an rtf control on my form. The control is populated with text from an
string array created as the application runs. The code to populate the rtf
control is as follows
For l = 0 To arrayList.GetUpperBound(0)
If arrayList(l, 0) Is Nothing Then
'do nothing
Else
output &= arrayList(l, 0) & vbTab & vbTab _
& arrayList(l, 1) & vbTab _
& arrayList(l, 2) & vbTab _
& arrayList(l, 3) & vbCrLf
End If
Next
RichTextBoxList.Text = output
My problem is that the 4 columns do not line up neatly in this method as the
strings in any element of the array may be longer (or shorter) than that in
the next element of the array. In some case the first index of the array
element will be longer than where the first tab would normally go in the
control and the next will be shorter. So the two columns are not lined up. I
need to be able to adjust, programatically, the gap between the tab stops in
the rtf control.
Is that possible or is there another solution
Thanks and regards
Michael Bond
I have an rtf control on my form. The control is populated with text from an
string array created as the application runs. The code to populate the rtf
control is as follows
For l = 0 To arrayList.GetUpperBound(0)
If arrayList(l, 0) Is Nothing Then
'do nothing
Else
output &= arrayList(l, 0) & vbTab & vbTab _
& arrayList(l, 1) & vbTab _
& arrayList(l, 2) & vbTab _
& arrayList(l, 3) & vbCrLf
End If
Next
RichTextBoxList.Text = output
My problem is that the 4 columns do not line up neatly in this method as the
strings in any element of the array may be longer (or shorter) than that in
the next element of the array. In some case the first index of the array
element will be longer than where the first tab would normally go in the
control and the next will be shorter. So the two columns are not lined up. I
need to be able to adjust, programatically, the gap between the tab stops in
the rtf control.
Is that possible or is there another solution
Thanks and regards
Michael Bond