473,757 Members | 8,085 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Listview help

Are there any good tutorials out on the net that explains the listview
control with great detail? Things like drag-drop features, icon additions,
etc...?
Nov 20 '05 #1
3 1371
BTW, what I'm trying to do is figure out how I can drag items from file
folders or the desktop and have them added to the listview (without actually
copying or removing them from the original spot) and appear in a details
view like manner (with icon). Thanks for any help.

"OpticTygre " <op********@ade lphia.net> wrote in message
news:5_******** ************@ad elphia.com...
Are there any good tutorials out on the net that explains the listview
control with great detail? Things like drag-drop features, icon additions, etc...?

Nov 20 '05 #2
Ok, I've gotten a simple solution:

"OpticTygre " <op********@ade lphia.net> wrote in message
news:YY******** ************@ad elphia.com...
BTW, what I'm trying to do is figure out how I can drag items from file
folders or the desktop and have them added to the listview (without actually copying or removing them from the original spot) and appear in a details
view like manner (with icon). Thanks for any help.

"OpticTygre " <op********@ade lphia.net> wrote in message
news:5_******** ************@ad elphia.com...
Are there any good tutorials out on the net that explains the listview
control with great detail? Things like drag-drop features, icon

additions,
etc...?


Nov 20 '05 #3
Disreguard last post...hit send too quickly. :o)

Ok, I have a simple solution:

Private Sub lstUploads_Drag Drop(ByVal sender As Object, ByVal e As
System.Windows. Forms.DragEvent Args) Handles lstUploads.Drag Drop
If e.Data.GetDataP resent(DataForm ats.FileDrop) Then
Dim FilesToDrop() As String
Dim i As Integer

FilesToDrop = e.Data.GetData( DataFormats.Fil eDrop)
For i = 0 To FilesToDrop.Len gth - 1
lstUploads.Item s.Add(FilesToDr op(i))
Next
End If
End Sub

Private Sub lstUploads_Drag Enter(ByVal sender As Object, ByVal e As
System.Windows. Forms.DragEvent Args) Handles lstUploads.Drag Enter
If e.Data.GetDataP resent(DataForm ats.FileDrop) Then
e.Effect = DragDropEffects .All
End If
End Sub

With this, I can drag/drop from anywhere. The problem is, where could I get
the other information involved with those files? IE, Icon properties to add
beside the name, filesize, datemodified, and all that jazzy information?
Does that require a super huge procedure, or could I just do it through
properties of properties of objects, and if so, how? For example, if I
wanted to add the file Test.txt to my listview by dragging it from the
desktop, I don't want just the path. I want a nice pretty txt icon beside
the filename, with size, type, and modified all in a row, just like windows
explorer in detail view mode. Any ideas?

Thanks again
-Jason

"OpticTygre " <op********@ade lphia.net> wrote in message
news:YY******** ************@ad elphia.com...
BTW, what I'm trying to do is figure out how I can drag items from file
folders or the desktop and have them added to the listview (without actually copying or removing them from the original spot) and appear in a details
view like manner (with icon). Thanks for any help.

"OpticTygre " <op********@ade lphia.net> wrote in message
news:5_******** ************@ad elphia.com...
Are there any good tutorials out on the net that explains the listview
control with great detail? Things like drag-drop features, icon

additions,
etc...?


Nov 20 '05 #4

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

Similar topics

7
6449
by: Dave Y | last post by:
I am a newbie to C# and am having trouble trying to override a ListView property method. I have created a new class derived from the Forms.Listview and I cannot figure out the syntax to override ListView.Items.Add(), . I see that it is a virtual method so it should be easy to do. If anyone can help I would appreciate it greatly. I can do what I need to do in a different way this would just make everything significantly cleaner and eaasier...
3
9316
by: MikeY | last post by:
Hopefully someone can help me on this. I am using C#, making Windows forms. I have created a listView with checkbox's. I have enabled the checkboxes under the properties, and all the data, checkbox's and icons are displayed as they are meant to be. My problem is this, I am trying to achieve the same results as I get with CheckListBox(s), where I am able to select (Check-mark) various checkboxs items and able to alter the data. I do...
2
2965
by: MikeY | last post by:
Hi all, I am coding window forms in C#. My problem is this: I have created a "Check ListView" or a 'ListView' with checkbox's. I have populated the it with my files from my folders, mps, txt, etc. The ListView is in Details, with headers and an Icon. What I am trying to accomplish is to rename/append check mark file massively (at once). This is accomplished by the user inputting a name into a provided
2
13764
by: Ken | last post by:
Hi all, Please help! I'm attempting to apply tooltips to each individual item in VB.Net's Listview control. In VB6 it was easy - you just did the following (assumes "myListView" is the name of the ListView control): set lst = myListView.ListItems.Add lst.Text = "Test1"
7
15003
by: BobAchgill | last post by:
I am trying to decide which of these controls to use to implement letting my user select a full row from MyList. The MyList has several columns which would be nice to sort by at run time. The MyList data is resident in a dataset table. I'm stuck and can't choose either because. If I choose ListView as my control I don't understand how to programmatically get the data from the dataset table
2
4094
by: Ben H | last post by:
Hello all I'm using a listview in my app but I want to scroll the listview programatically as I hate the look of the standard scrollbar. So, the listview is scrolled programatically using ensurevisible, ie the listview shows a maximum of 6 items and if I want to scroll down one I use the code... listview.ensurevisible(listview.TopItem.Index + 6)
1
2058
by: samoore33 | last post by:
I found this code on MSDN, and it works great. It creates a ListView dynamically and add items to it and all. It is great. I have changed a few of the column names to suit me. Dim listView1 As New ListView listView1.Bounds = New Rectangle(New Point(10, 10), New Size(300, 200)) ' Set the view to show details.
12
3413
by: garyusenet | last post by:
I have had no replies to my previous post so perhaps I didn't write it good enough. Please excuse new thread but i wanted to break from the last thread hopefully this thread will be better. Very simple. I would like to create listviewitem's for display in a listview control. The listview items need to contain properties from Internet Explorer windows i've managed to collect into an arraylist.
4
4515
by: Brian Gaze | last post by:
I have created a ListView control and have bound this to a datasource. Within the ItemTemplate of the ListView I have added another ListViewControl which is databound in the code behind. The idea is that when clicking on the "Show details" button the ListView for the appropriate row binds in the codebehind and displays the detail data for the selected row. I did something similar with a gridview control previously, but want to be able to...
7
3582
by: Brad Pears | last post by:
I have something strange going on - pretty sure it used to work before - and now it does not... Why does the following code not clear a combo box? Me.cboLocation.Text = String.Empty OR Me.cboLocation.Text = ""
0
9489
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9298
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9737
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7286
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6562
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5172
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5329
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3399
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2698
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.