473,506 Members | 13,088 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ListView 0th column

VR
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
Nov 15 '05 #1
2 2416

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" <Vi****************@gat.com>
| Sender: "VR" <Vi****************@gat.com>
| Subject: ListView 0th column
| Date: Sun, 24 Aug 2003 17:35:42 -0700
| Lines: 12
| Message-ID: <02****************************@phx.gbl>
| 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
|

Nov 15 '05 #2
Hi Victor,

Even the VS.NET IDE doesnt allow column 0's alignment to be "right".
In VB, it raises an error "column 0 must be left aligned"

HTH
Kalpesh

"VR" <Vi****************@gat.com> wrote in message news:<02****************************@phx.gbl>...
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

Nov 15 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1728
by: rmorvay | last post by:
I have successfully integrated sorting in the listview control with the following code: Private Sub ListView_ColumnClick(ByVal sender As Object, ByVal e As...
6
4615
by: VM | last post by:
How can I fill up a listview with text file contents? My listview has two columns and the first column fills up with a while loop: while (myString != null) { myString = sr.Readline();...
1
23654
by: andrewcw | last post by:
The clcik event on the ListView control seems to trigger off the item level ( the first column ). I would like to be able to trap the click event on a particular subitem ( a specific column's row...
1
14997
by: neelu | last post by:
I have four columns in listview. SR Number Part# DES Qty Weight 59 9410106800 Nut 10 0.03 60 90304ge800 Helmet 5 0.325 61 9635439604 ...
5
7250
by: billuy | last post by:
Is there a way to sort by a specified column in a listview? I'd like my users to be able to click on the column heading and have the listview sort by that column. Thanks, Billyb
12
3085
by: Dennis | last post by:
I have a form which has a ListView control named ListView1 added at design time. When I add items using the following code, they don't appear in the list view. However, if I create a ListView...
12
7449
by: J L | last post by:
When I fill a listview, I resize the columns to fit the data. I need to know if the data will fit vertically or if there will be a vertical scroll bar. I need to know this so I can allow for it on...
2
4252
by: GT | last post by:
Could someone please explain how to add images to a ListView other than in the first column?
11
9970
by: Alan T | last post by:
Does the ListView supports sort? I want to have a up/down arrow/triangle that show it is sorted asc or desc on the column headers when I click the column header. May be I need a third-party...
3
5397
by: Martin Panggabean | last post by:
Hello All, I've kind a logic problem ... I want to fill the listView control in VB.NET with data in my mySql table using Datareader object component. But It seems that the way of how listView...
0
7105
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7308
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7371
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5617
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5037
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4702
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3188
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
757
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
410
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.