Link in listbox??

  • Thread starter Thread starter perspolis
  • Start date Start date
P

perspolis

hi everyone
how can i show links in a list view or list box??
or show items in list box that be tender to Click event?
 
I once used a MouseUp event to get the click like effect.

And (i dont know if its going to be useful for u or not but) if you want to
get a highlight effect when mouse hovers above the listbox items you can use
this :

private void listBox1_MouseMove(object sender,
System.Windows.Forms.MouseEventArgs e)
{
int index = listBox1.IndexFromPoint( e.X , e.Y );
if ( index >=0 && listBox1.SelectedIndex!=index )
{
listBox1.SelectedIndex =index;

}
Point p= this.PointToClient( new Point( e.X,e.Y ));
//label1.Text= "x:"+p.X +",y:"+p.Y ; //just a debugging thing
}


Ab.
hope that helps.
 
You have to subcribe to the Click or DoubleClick event of the ListBox and do
Process.Start(myUrl) if the event is fired.
 
Back
Top