473,569 Members | 2,466 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_SETCOLUMNOR DERARRAY 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 2426

Hi VR,

What order do you want to change?
Just changing the columnheader order or changing the column items order?
LVM_SETCOLUMNOR DERARRAY can be used to change the order of
the columnheader(co lumnhearder 0 also can be changed)

Public Declare Function SendMessage Lib "user32" Alias "SendMessag eA"
(ByVal hwnd As IntPtr, ByVal wMsg As Integer, ByVal wParam As Integer,
<MarshalAs(Unma nagedType.AsAny )> ByVal o As Object) As Integer

Const LVM_SETCOLUMNOR DERARRAY As Integer = &H1000 + 58
Private Sub Button1_Click(B yVal sender As System.Object, ByVal e As
System.EventArg s) Handles Button1.Click
Dim lpint(3) As Int32
lpint(0) = 2
lpint(1) = 1
lpint(2) = 0
lpint(3) = 3
SendMessage(Lis tView1.Handle, LVM_SETCOLUMNOR DERARRAY, 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: AcNqoNBl8PI2k36 GQBuiV4Z6E3Br6A ==
| Newsgroups: microsoft.publi c.dotnet.langua ges.csharp
| Path: cpmsftngxa06.ph x.gbl
| Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.langua ges.csharp:1790 27
| NNTP-Posting-Host: TK2MSFTNGXA14 10.40.1.166
| X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.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_SETCOLUMNOR DERARRAY 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_SETCOLUMNOR DERARRAY 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
1735
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 System.Windows.Forms.ColumnClickEventArgs) Handles ListView.ColumnClick If ListView.Sorting = System.Windows.Forms.SortOrder.Ascending Then ListView.Sorting =...
6
4623
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(); listView1.Items.Add (myString); } Is there a way I can fill up the second column this easily? Thw way I'm currently doing it is using the subitems...
1
23676
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 ). If possible, what do I do to activate that 'cell' - thanks. I thought that listView.LabelEdit = true; would enable me to navigate into the...
1
15001
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 Cap 15 0.421 62 25340h1245 Shoes 2 0.001 I want that when I click on column part# it sort the list View
5
7258
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
3103
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 control in code and add it to the form, it works. Why don't the items show up in the ListView that I added at desgn time. ' Create three items and...
12
7466
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 the overall size of the listview. My question therefore is, how can I tell if the items I have added will fit in the listview at its given...
2
4259
by: GT | last post by:
Could someone please explain how to add images to a ListView other than in the first column?
11
9978
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 components ?
3
5402
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 being used is quite different from usual column-row component like Grid component. If you kind a familiar using listView, u must have known what i'm...
0
7703
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7926
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8132
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7678
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7982
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5514
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3644
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2116
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1226
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.