ListView text alignment

S

Simon Abolnar

I am using VB.NET 2003
Framework 1.1

I have a question of ListView.
Is it possible to align text in header centered, and text of items left?
I also seem that there is a bug. I can't align 1.st column header centered.
I solve the problem by aligning text left and then manually add spaces in
header text " text header".
How could I do this by code? I think that I could use GetItemRect. How?

Thanks for help!

Simon
 
H

Herfried K. Wagner [MVP]

* "Simon Abolnar said:
I have a question of ListView.
Is it possible to align text in header centered, and text of items left?

You will have to draw the headers yourself. Have a Google Grups Search on
this topic -- you won't find "ready-to-use" solutions but you will find
some tips.
I also seem that there is a bug. I can't align 1.st column header centered.
I solve the problem by aligning text left and then manually add spaces in
header text " text header".

That's by design. The 1st solumn is always left-aligned.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top