Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

How do I make a web link in a listview box

Posted on 2013-11-12
3
269 Views
Last Modified: 2013-11-27
Hi all
I have a list view in my project and have web address



lvi.SubItems.Add(feed.Link.Value); //Adding Link 12/11/2013 arw

Open in new window


I would like not to display the link but the word download and make it clickable

thanks in advance
0
Comment
Question by:awolarczuk
  • 2
3 Comments
 
LVL 96

Expert Comment

by:Bob Learned
ID: 39643219
That is a non-standard operation, and you would have to do some magic, like determining which column is clicked on.

var mousePosition = listView.PointToClient(Control.MousePosition);
    var hitTest = listView.HitTest(mousePosition);
    var columnIndex = hitTest.Item.SubItems.IndexOf(hitTest.SubItem);

Open in new window

0
 

Author Comment

by:awolarczuk
ID: 39643222
cool mate where do i put this
0
 
LVL 96

Accepted Solution

by:
Bob Learned earned 500 total points
ID: 39643507
Sorry, that would be in the ListView_Click event handler.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
The goal of this video is to provide viewers with basic examples to understand recursion in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use switch statements in the C programming language.

791 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question