Treeview text formating
Posted on 2004-04-09
I have a Treeview activeX object display some of my data. One branch needs to be formated so it looks like it is in 2 columns. I just cant get my pad function to work correctly. This is what I have:
Public Function PadRight(strIn As String, intLength As Integer)
If Len(strIn) < intLength Then
PadRight = strIn & String(intLength - Len(strIn), " ")
PadRight = Left(strIn, intLength)
And this is how I call it...
strTXT = rsOverview!Brand & " - " & rsOverview!Model
mNode.Text = PadRight(strTXT, 40) & "Total: " & rsOverview!Total & " Available:" & rsOverview!Available
Nothing lines up in the second column at all unless the strTXT is the same length as the others.