Center text in a Listbox [C# 2002]

Shaitan00

Junior Contributor
Joined
Aug 11, 2003
Messages
358
Location
Hell
I was wondering if there was a way to CENTER text in a ListBox - specifically I have a listbox (lbInformation) to which I add items

[lbInformation.Items.Add(sItem);] and I would like this to be displayed in the listbox as CENTERED text (not default left-justified) however I can't seem

to find any settings or properties that allows me to set the text positioning - is there a simple way to achieve this?

Any help would be much appreciated.
Thanks,
 
I'm not by my IDE, but have you looked at the Listbox->Font property? Possibly there is an align value in there, along with color, font face, size, etc...
 
ListBox does not support this feature out of the box. In order to achieve this result you would have to owner draw your ListBox.
 
No I already checked all the Apperance Properties (including Font) displayed in the Properties window of the control and there is nothing regarding alignment that can be set (from what I can see).
 
Back
Top