Justify columns in list box

jjturner

Registered User.
Local time
Today, 04:11
Joined
Sep 1, 2002
Messages
386
Hello,

Is there any way to set each column's justification in a multi-column list box? I can't find any method to keep numbers, etc from left-justifying when it would be preferable to right-justify number fields.

Thanks,
John
 
OK,

In a tirade of frustration I finally came up with a way to get number columns in a list box to right-justify.

I used a function to programmatically fill the list box and I used RSet function to move the number value to the right side of a string. The following is a portion of the list box populate function (my potential number values are integers less than 1000):

If Not IsNull(varProductivityElements(col, row)) Then
---Select Case varProductivityElements(col, row)
------Case Is > 99
---------strFieldLengthInit = "1234567"
------Case Is > 9
---------strFieldLengthInit = "12345678"
------Case Is < 10
---------strFieldLengthInit = "123456789"
---End Select
---RSet strFieldLengthInit = CStr(varProductivityElements(col, row))
---ReturnVal = strFieldLengthInit
Else
---ReturnVal = ""
End If

Cheers,
John
 

Users who are viewing this thread

Back
Top Bottom