|
-
December 3rd, 1999, 05:45 AM
#1
Listview: Icon on the left or on the right...
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
-
December 5th, 1999, 03:14 AM
#2
Re: Listview: Icon on the left or on the right...
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.
-
December 5th, 1999, 03:15 AM
#3
Re: Listview: Icon on the left or on the right...
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.
-
December 6th, 1999, 03:04 AM
#4
Re: Listview: Icon on the left or on the right...
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|