I have an array of labels whose captions list candidates on a ballot. I want to make the captions of equal length regardless of some variations in the length of the candidates' names. Right now, I have the following code:
Number = 32 - (Len(CandidateName) + Len(Affiliation))
NewBallotPage.Label1(IndexNumber).Caption = CandidateName & String(Number, Chr(45)) & Affiliation
I want to use a substring of hyphens to make the captions of equal length, such as the following.
BUSH-----------------------(REP)
BUCHANAN-------------------(RPA)
I am currently using Ms Sans Serif, Fontsize 8. The problem is that the code above does not result in captions of equal length. The hyphen (Chr45) is not as wide as the characters used in the names. The result is that the second caption is longer. It's important that I use code to enter the captions at run time. What can I do about it?
Number = 32 - (Len(CandidateName) + Len(Affiliation))
NewBallotPage.Label1(IndexNumber).Caption = CandidateName & String(Number, Chr(45)) & Affiliation
I want to use a substring of hyphens to make the captions of equal length, such as the following.
BUSH-----------------------(REP)
BUCHANAN-------------------(RPA)
I am currently using Ms Sans Serif, Fontsize 8. The problem is that the code above does not result in captions of equal length. The hyphen (Chr45) is not as wide as the characters used in the names. The result is that the second caption is longer. It's important that I use code to enter the captions at run time. What can I do about it?