473,789 Members | 2,957 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to highlight the listview items during drag-and-drop operation

I need to associate items in two listviews. I have got the drag-and-drop operation to perform as I wanted. However, I would like the items in the target listview to be highlighted when the mouse hovers over them during the drag-and-drop operation, so that I know for sure which item I selected on the target listview.

I have tried a number of approaches without success, including:

1) TargetListview. DragEnter event – tried to .GetItemAt(e.X, e.Y) and then set Item.Selected = True

2) TargetListview. MouseMove event – tried to .GetItemAt(e.X, e.Y) and then set Item.Selected = True

3)TargetListvie w.HoverSelectio n = True

I would appreciate it very much if one of the experts could tip me on how to accomplish this. Thank you very much in advance.

--
Marco Auday
Jul 21 '05 #1
0 1459

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

Similar topics

0
2232
by: keith | last post by:
In a ListView control (two columns), I added a few ListView items. ListView listview=new ListView(); listview.Parent=this; listview.View=View.Details; listview.Columns.Add ("Col1",200,HorizontalAlignment.Left); listview.Columns.Add ("Col2",800,HorizontalAlignment.Left);
9
6389
by: C# Learner | last post by:
Has anyone else noticed ListView's unbearable flickering? I have a project containing a list-view with the following: - View: Details - Columns: 5 The following code causes the list-view to flicker: private void TestListView() {
2
4398
by: Tim Bücker | last post by:
Hello, I have a listview (detail) that gets filled with items using a button. After adding some items new items are not visible in the listview because it does not scroll automatically. Is there a way to make new items always visible in the listview? ________ <-- ListView starts here 1 2
0
894
by: g1ga | last post by:
is there a way to drag icons (items) of a listview inside listview itself in a disordered way (like windows explorer)? I wondered why such a control is not implemented since it is one of the core components of windows itself.
21
5232
by: StriderBob | last post by:
Situation : FormX is mdi child form containing 2 ListViews ListView1 contains a list of table names and 4 sub items with data about each table. ListView2 contains a list of the columns on each table and 11 sub items with data about each column. When a Row in ListView1 is selected the Data in ListVies2 is loaded to show the correct data. Initially the first row in ListView1 is selected in FormX load
3
8329
by: ljlevend2 | last post by:
I've noticed that selected items in a ListView are only highlighted if the control has focus. I find this to be highly undesirable because it can cause the control to behave differently than what would be expected based on the visual appearance. Is there any way to force the selected items to be highlighted even when the control does not have focus? Thanks, Lance
18
1963
by: mrshrinkray | last post by:
Are there any know bugs with the ListView in .NET 2? I'm having problems with an application that takes 15 seconds in 1.1, and now takes over a minute. The code in question uses: listViewItem = this.listView1.Items.Add(...) followed by 7 calls to listViewItem.SubItems.Add(...)
2
5599
by: james | last post by:
Hello I'm implementing drag and drop between two listviews (in detail view mode). When I drag an item from box a to box b, I then process information relating to the two items. The item from box a does not need to be added into box b. What I can't see how to do is for the item under the mouse in box b when I'm dragging to get selected/highlighted? I can get the index of the item in B so I know which item it is, it's just
0
1019
by: Rich Raffenetti | last post by:
I want to display the subitems column to the left side of the items column in a details listview. It's easy to drag the columns to swap their display in the listview window. Is it possible to do that in the program?
4
13863
by: Bill-R | last post by:
I'm trying to convert a vb6 program to vb.net (vb2008 express) I have text data in a Listview Control I use a Textbox to enter characters to search the Listview When a Match is found, I use textbox_textchanged to select listview item Listview1.Items(z).Selected = True Listview1.Items(z).EnsureVisible () Listview1.Items(z).FullRowSelect = True Listview1.Items(z).ForeColor = Blue
0
9666
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
10200
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9984
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...
0
9020
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7529
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
6769
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();...
1
4093
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
2
3701
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2909
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.