Hi VR,
What order do you want to change?
Just changing the columnheader order or changing the column items order?
LVM_SETCOLUMNORDERARRAY can be used to change the order of
the columnheader(columnhearder 0 also can be changed)
Public Declare Function SendMessage Lib "user32" Alias "SendMessageA"
(ByVal hwnd As IntPtr, ByVal wMsg As Integer, ByVal wParam As Integer,
<MarshalAs(UnmanagedType.AsAny)> ByVal o As Object) As Integer
Const LVM_SETCOLUMNORDERARRAY As Integer = &H1000 + 58
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim lpint(3) As Int32
lpint(0) = 2
lpint(1) = 1
lpint(2) = 0
lpint(3) = 3
SendMessage(ListView1.Handle, LVM_SETCOLUMNORDERARRAY, 4, lpint)
End Sub
Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! -
www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
--------------------
| Content-Class: urn:content-classes:message
| From: "VR" <
[email protected]>
| Sender: "VR" <
[email protected]>
| Subject: ListView 0th column
| Date: Sun, 24 Aug 2003 17:35:42 -0700
| Lines: 12
| Message-ID: <
[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Thread-Index: AcNqoNBl8PI2k36GQBuiV4Z6E3Br6A==
| Newsgroups: microsoft.public.dotnet.languages.csharp
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.csharp:179027
| NNTP-Posting-Host: TK2MSFTNGXA14 10.40.1.166
| X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
|
| Is there any to right-justify the 0th (main/item's) column
| in ListView?
|
| I have a ListView control, which I send a
| LVM_SETCOLUMNORDERARRAY message to change the order of
| columns. Neither before or after I send this message, I
| can right-justify the 0th column.
|
| Any ideas?
|
| Thanks,
| VR
|