ListView control and column headers, change text possible? 
Author Message
 ListView control and column headers, change text possible?

I'm using a listview control and sorting a column when a user clicks on a
columnheader.  Is there an easy way to change the font from normal to bold
on the selected column header?  Also, anyone know how the display the UP or
DOWN triangle (to indicate ascending or descending order) that I see in
Outlook and Outlook Express columns?

thanks,



Sat, 05 Jun 2004 06:04:50 GMT  
 ListView control and column headers, change text possible?
Here's info on adding the triangles..

How to Add Images to a ListView Header
http://www.mvps.org/vbnet/index.html?code/comctl/lvheaderimage.htm

and... this sample may help for the font questions..

CustomDrawLV Demo
http://www.mvps.org/vbvision/Sample_Projects.htm

--
Ken Halter
MS-MVP-VB
http://www.vbsight.com
Please respond only to the newsgroups so all can benefit.
Besides.. I check my email only once a week :-)


Quote:
> I'm using a listview control and sorting a column when a user clicks on a
> columnheader.  Is there an easy way to change the font from normal to bold
> on the selected column header?  Also, anyone know how the display the UP
or
> DOWN triangle (to indicate ascending or descending order) that I see in
> Outlook and Outlook Express columns?

> thanks,



Sat, 05 Jun 2004 06:12:46 GMT  
 ListView control and column headers, change text possible?

Quote:

> I'm using a listview control and sorting a column when a user
clicks on a
> columnheader.  Is there an easy way to change the font from
normal to bold
> on the selected column header?

Not really.

Quote:
> Also, anyone know how the display the UP or
> DOWN triangle (to indicate ascending or descending order) that
I see in
> Outlook and Outlook Express columns?

The ColumnHeader as an Icon property that points to an item in
your ImageList.  If I remember correctly, it's not terribly easy
to control, but you can get this effect.


Sat, 05 Jun 2004 06:13:54 GMT  
 ListView control and column headers, change text possible?
Victor

2nd part of your question try this code. set up icons in  imagelist  control
with key "up" and "down".

Des

Private Sub lsvList_ColumnClick(ByVal ColumnHeader As
MSComctlLib.ColumnHeader)
lsvList.ColumnHeaderIcons = ImageList1
    With ColumnHeader
          lsvList.SortKey = .index - 1
          Select Case .index
                Case 1
                      If .icon = "up" Then
                            .icon = "down"
                            lsvList.SortOrder = lvwDescending
                      Else
                            .icon = "up"
                            lsvList.SortOrder = lvwAscending
                      End If
                Case n
          End Select
    End With
End Sub


Quote:
> I'm using a listview control and sorting a column when a user clicks on a
> columnheader.  Is there an easy way to change the font from normal to bold
> on the selected column header?  Also, anyone know how the display the UP
or
> DOWN triangle (to indicate ascending or descending order) that I see in
> Outlook and Outlook Express columns?

> thanks,



Sat, 05 Jun 2004 07:22:45 GMT  
 ListView control and column headers, change text possible?
The ColumnHeader object doesn't contains a property like "Font". It seems
we can change it here.

Luke

(This posting is provided ?AS IS?, with no warranties, and confers no
rights.)



Sat, 05 Jun 2004 14:58:58 GMT  
 ListView control and column headers, change text possible?

thoughts were released on Tue, 18 Dec 2001 06:58:58 GMT
bearing the following fruit:

Quote:
>The ColumnHeader object doesn't contains a property like "Font". It seems
>we can change it here.

huh?


Sat, 05 Jun 2004 16:27:14 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Is it possible to hide only one Column Header inm a ListView

2. Is it possible to change excel column headers ?

3. How to change color of ListView column header?

4. Change the column header color in ListView

5. Listview find Column Header Text

6. ListView Question; How to get column header text

7. Is it possible to enter a text directly to a ListView (only on a specific column)

8. VB4: Column headers in ListView control are doubled!

9. ListView control column headers position and width

10. Problem resizing Column Headers in listview control

11. VB4: Column headers in ListView control are doubled!

12. Is it possible to change a listview column header's text to say bold?

 

 
Powered by phpBB® Forum Software