Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Right align numbers in a listbox

Status
Not open for further replies.

Jamie2002

Technical User
Joined
Sep 17, 2001
Messages
62
Location
GB
I have a series of listboxs which based upon the selection in the previous listbox return summary figures. ie each list box has a narrative and 4 columns of numbers.

I have formatted these numbers so that they show like £123,456 but they automatically align to the left, how do I get these to align to the right ? I have tried Rset around each field but it wont accept it.

Thanks.

Jamie. Thanks

Jamie
 
What about selecting the List box in design view and altering the 'text align' property to 'Right'
 
The right-align button is greyed out for list boxes. Thanks

Jamie
 
Sorry didn't realise that !! (I usually use combo boxes)
 
While the combobox is probably an easier / better approach, you CAN do the list box. You can use a fixed pitch font and justify the entry to the right in a field of spaces. another approach is to figure out the screen width of any font and print to the list box at the position necessary to align the right of the set of values.

MichaelRed
m.red@att.net

There is never time to do it right but there is always time to do it over
 
One little trick I learned a while ago is that usually for proportionally-spaced (typographic) fonts a number is the equivalent of two spaces. While this isn't foolproof, it's usually "good enough."
Regards, John Harkins
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top