How to put sorting arrow in List View header?

D

Dino Buljubasic

A simple way to do this is VB.NET is like this:

lvwIndex.Columns.Item(e.Column).Text = _
strColHeaderNOArrow & " " & ChrW(&H25B2)


I tried to do the same in C# like:

lvwProvinces.Columns[e.Column].Text =
lvwProvinces.Columns[e.Column].Text + " " + '\u25BC';

however, it displays a square instead of filled arrow.

Does anybody knows what I am doing wrong?

Any help will be appreciated
_dino_
 
G

Guest

Check the Webdings and Windings font families. You can change the font used
for column headers to those to show special symbols. There might be other
easier ways to do that, but this technique should apply anywhere display of
different fonts is supported.
 
D

Dino Buljubasic

Thank you,

that was the problem. I was using Microsoft Sans Serif which does not
support unicode.

Arial does.

I appreciate your help.

_dino_

Check the Webdings and Windings font families. You can change the font used
for column headers to those to show special symbols. There might be other
easier ways to do that, but this technique should apply anywhere display of
different fonts is supported.

Dino Buljubasic said:
A simple way to do this is VB.NET is like this:

lvwIndex.Columns.Item(e.Column).Text = _
strColHeaderNOArrow & " " & ChrW(&H25B2)


I tried to do the same in C# like:

lvwProvinces.Columns[e.Column].Text =
lvwProvinces.Columns[e.Column].Text + " " + '\u25BC';

however, it displays a square instead of filled arrow.

Does anybody knows what I am doing wrong?

Any help will be appreciated
_dino_
 

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