Link to home
Start Free TrialLog in
Avatar of twibblejaway
twibblejaway

asked on

Enlarge a picture and add text on mouseover - using Listview

Hello.  Currently I am using a Listview box.  In the box I have a list of items, with pictures above each item title.  As I type into a textbox, the results of the Listview box change dynamicaly to match what I am typing.


I want to make it so that if I hold the mouse cursor over the picture of one of the items, the picture is enlarged, and some extra details about the item are displayed beneath the picture... then when I move the mouse away it shrinks back into the list.  

Is this possible with listview?  If so can somebody point me on the right track, or tell me what approach i need to take?

Thanks,
Avatar of Bob Learned
Bob Learned
Flag of United States of America image

1) How are the pictures displayed?  

2) What is the View set to for the ListView?  LargeIcons?

Bob
Avatar of twibblejaway
twibblejaway

ASKER

1)I am getting the image name from an access database,
then:
LargeImageList.Images.Add("image")

then putting it into the Listview:
Listview.Items.Insert(i, "item_name", i)


2) It is set to largeicons.  
Do you want to display larger images in the ListView or another control, like a PictureBox control?

Bob
Maybe I am going about this the wrong way.  What I want is
A box on the screen with images:

-----------------------
|   IMG_A  IMG_B   |
|    texta    textb    |
|                          |
|                          |
|   IMG_C  IMG_D  |
|    textc    textd    |
|                          |
|                          |
|                          |
-----------------------

When I mouse over IMG_A, i want the image to be enlared, and also extra information about the image to be displayed (eg, price, quantity available)

How can I accomplish this?
I think that your approach would be very difficult, if not impossible, to accomplish.  Your ListView is bound to an ImageList.  ImageList's can only contain fixed image sizes.  You would have to switch ImageLists between a small list, and a large list, but that size would apply to all the images, and not just the selected item.  The ListView control has a StateImageList, but that wouldn't help.

Bob
Any ideas how I can accomplish what I want to do?
SOLUTION
Avatar of Bob Learned
Bob Learned
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I decided to go another route, but I may use ideas from either or both of you so I'll just split the points.  Thanks for your help.