Click to See Complete Forum and Search --> : Listview: Icon on the left or on the right...
pafal
December 3rd, 1999, 04:45 AM
I want to mimic Outlooks mailclient uses icons in the columnheader when you click on them to sort.
How do I go about placing the icon on the right side of the text. I've tried the different alignment options given, but that only seem to affect the placement of the text leaving the icon stuck to the left.
TIA
//Patrik
Sigal Laniado
December 5th, 1999, 02:14 AM
There is a free OCX with source code that emulate the OUTLOOK list view at www.wbAcceleretor.com.
Look at this Web site in the VB section there are a lot of examples.
Sigal Laniado
December 5th, 1999, 02:15 AM
There is a free OCX with source code that emulate the OUTLOOK list view at www.vbAcceleretor.com.
Look at this Web site in the VB section there are a lot of examples.
Ravi Kiran
December 6th, 1999, 02:04 AM
I dont know how you are doing: Here is a piece of code that does that. Taken straight from a project: so i hope you will understand the missing links:
' Sets the ListView header image. It is assumed that a listview is tied to a Image
' list control from which it will pick up the images.
' Inputs: lvHwnd : Hwnd parameter of a Listview control
' iColumnid : 0-based Column index. First column = 0 .. etc
' iImageIndex: 0-based index into the images of the imagelist control
' tied to the list view
public Sub SetLVHdrImage(byval lvHwnd as Long, _
byval iColumnid as Long, byval iImageINdex as Long)
Dim lrtn as Long
Dim plvcolumninfo as LVCOLUMN
plvcolumninfo.mask = LVCF_IMAGE + LVCF_WIDTH
lrtn = SendMessageAny(lvHwnd, LVM_GETCOLUMNA, iColumnid, plvcolumninfo)
With plvcolumninfo
.mask = LVCF_IMAGE + LVCF_FMT
.iImage = iImageINdex
.fmt = LVCFMT_IMAGE + LVCFMT_BITMAP_ON_RIGHT
End With
lrtn = SendMessageAny(lvHwnd, LVM_SETCOLUMNA, iColumnid, plvcolumninfo)
End Sub
RK
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.