Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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,

Posted
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...

~Nate�

___________________________________________

Please use the [vb]/[cs] tags on posted code.

Please post solutions you find somewhere else.

Follow me on Twitter here.

Posted
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).
Posted
ListBox does not support this feature out of the box. In order to achieve this result you would have to owner draw your ListBox.

 

owner draw?

Amir Syafrudin

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...