Listview item display:

In my application when I am entering string it compares with formtext of each form.If it matches with
any of the formText ,it displays the image of panel2 that is on each form .These images appears in listview
as a result of matching of two strings(string in textbox and string of formtext)...
Now problem is that when results are displayed in listview ,then the images appears in center and I want to
left allign each image in teh column.
How can I allign the images to the left in the column like we have SNO. alligned to the left in column1.

avirag, I don't know how to get the control to display exactly how you want. The view set to detail gives you the single column list (what you have now), but I don't know how to cause it to draw left instead of center.

The largeicon view will give you the left justification, but it begins another column as needed to fill with items. The limit on the image width is 256 (you have 230 now I think), so you can't go much higher. I was able to get the single column to the left (your desired view) by resizing the form and control to be just under the width * 2 requirement it needed to display two columns in largeicon view mode, but for this to look nice and achieve the desired result, you would need to rearrange the items you have in top panel in order to still have them visible after shortening the width of the form to shrink your listview panel...

Maybe someone else has an idea...

Upload your search engine project again demonstrating the behavior and we will take a look at it............................................................................................................................................

Edited 7 Years Ago by sknake: n/a

Upload your search engine project again demonstrating the behavior and we will take a look at it............................................................................................................................................

Here is the application Sknake..........
In this when results are displaying in Listview, so under Result column images of the results are appearing in the center, i want that image should appears towards left in Result column like we have S.No. towards left in column1.............
I don't want to remove the S.No. Column. I just want that result column items should appear towards left.......
Currently items are displaying in center.............
Kindly help me regarding this..........

You need to owner draw the list view and render the picture manually. It looks like there is no formatting for the listview that we can use here. Take a stab at it and post your updated code up here and we'll take a look at it :)

(You could also consider using a grid)

Edited 7 Years Ago by sknake: n/a

This article has been dead for over six months. Start a new discussion instead.