I have a listview1 and below it i have a frame. Inside that frame i have a few controls such as textbox,web browser control,listview and button. My intention is to make the frame invisible when user haven't selected a row in listview1 both using right click or left click over listview row. However, using the code below i am facing a few problems:
1)the left click never works.if i left click over row nothing happens(frame doesn't become visible) .If i left click on the white area of listview the frame does become invisible!!( Note: right click works in make frame visible and invisible)
2)Both left click and right click doesn't un highlight the selected listview row.
Furthermore, i want to reload web browser and listview inside the frame on click of listview1 row .I be happy if some one help me fix these problem.Thanks
1 Code:
Private Sub ListView1_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
1)the left click never works.if i left click over row nothing happens(frame doesn't become visible) .If i left click on the white area of listview the frame does become invisible!!( Note: right click works in make frame visible and invisible)
What code do you have in the Listview click event? That is what will fire when you left click.
Originally Posted by tony007
2)Both left click and right click doesn't un highlight the selected listview row.
That makes perfect sense. Selecting a row will highlight it, not unhighlight it.
Originally Posted by tony007
Furthermore, i want to reload web browser and listview inside the frame on click of listview1 row .I be happy if some one help me fix these problem.
I have no idea what this is about. What does a webbrowser have to do with using your listview?
What code do you have in the Listview click event? That is what will fire when you left click.
The code below belongs to listview1 client event.How to tell this code to make frame visible when i left click on listview row?
or how to tell this code to make frame invisible when i left click over white area of listview where there is no row?
That makes perfect sense. Selecting a row will highlight it, not un highlight it.
opps. I mean how to un highlight the row when i left click or right click white area of listview where
there is no row?
I have no idea what this is about. What does a web browser have to do with using your listview?
I 2 have web browser control and listview inside frame.Their values depend on listview1 4th and
first column. So i want them to get those data and load corespondent web page when i right click or
left click a particular row.Right now those web browsers doesn't load correct page because
no data reached them and they did reload to display the correct pages!!
Private Sub ListView1_Click()
gstrSomething = ListView1.SelectedItem.SubItems(4)
gstrSomethingElse = ListView1.SelectedItem.Text
Frame1.Visible = True
End Sub
Hack i already did that but how to unselect listview row and hide frame when i click(righit click or left click) on white area of listview where there is no row?