|
-
Mar 27th, 2006, 07:42 PM
#1
Thread Starter
Member
listview with frame
I have problme with listview1, I created listview1 with two categories in listview1, I added frame1 and frame2, if i click one of catagories in listview called "general", it will bring frame1 and hide frame2, how can i write that code! how can i write this code to make works by click on one of catagories in listviw1 to bring frame1 or frame2!
-
Mar 27th, 2006, 07:54 PM
#2
Frenzied Member
Re: listview with frame
it doesn't sound clear but i think the logic would take the discussion to the click event of the listview
i can only give you the logic since it isn't clear enough for me
VB Code:
Private Sub ListView1_Click()
If LIstView1.SelectedItem.Text - "<category1>" then
Frame1.Visible = True
Frame2.Visible = False
else
Frame2.Visible = True
Frame1.Visible = False
End If
End Sub
On error goto Trap
Trap:
in case of emergency, drop the case...
****************************************
If this post has been resolved. Please mark it as "Resolved" by going through the "Thread Tools" above and clicking on the "Mark Thread Resolved " option. if a post is helpful to you, Please Rate it by clicking on the Rate link right below the avatar
-
Mar 28th, 2006, 12:37 PM
#3
Thread Starter
Member
Re: listview with frame
thanks for reply but, i have tested is not working right, when I click "General" is works fine but when i click "secuirty" is not working only "General" working... the rest of "secuirty" and "backUP" is not showing, did i missed something!
if i have to write while statment, how can I write that becuase is got me confused. please help me.
VB Code:
Private Sub ListView1_click()
If ListView1.SelectedItem.Text = "General" Then
Frame1.Visible = True
Frame2.Visible = False
frame3.visible = false
Else
If ListView1.SelectedItem.Text = "Security" Then
Frame1.Visible = False
Frame2.Visible = True
frame3.visible = False
else
If ListView1.SelectedItem.Text = "Security" Then
Frame1.Visible = True
Frame2.Visible = False
frame3.visible = True
End if
End If
End If
End sub
Last edited by Hack; Mar 28th, 2006 at 12:42 PM.
Reason: Added [vbcode] [/vbcode] tags for more clarity.
-
Mar 28th, 2006, 12:46 PM
#4
Re: listview with frame
Try this
VB Code:
If ListView1.SelectedItem.Text = "General" Then
Frame1.Visible = True
Frame2.Visible = False
frame3.Visible = False
ElseIf ListView1.SelectedItem.Text = "Security" Then
Frame1.Visible = False
Frame2.Visible = True
frame3.Visible = False
Else
Frame1.Visible = True
Frame2.Visible = False
frame3.Visible = True
End If
-
Mar 28th, 2006, 02:21 PM
#5
Thread Starter
Member
Re: listview with frame
still not working. is just not showing when click "Security" or "backup"...but is showing "general".
i wonder why is not working! any idea why!
-
Apr 25th, 2006, 12:30 AM
#6
New Member
Re: listview with frame
If ListView1.SelectedItem.Text = "General" Then
call HideAllFrame
Frame1.Visible = True
end if
If ListView1.SelectedItem.Text = "Security" Then
call HideAllFrame
Frame2.Visible = True
end if
public sub HideAllFrame()
Frame1.Visible = False
Frame2.Visible = False
frame3.Visible = False
end sub
' Try to check the listview index. Did you assign the correct one?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|