I have 2 listview in form... with same dimension and same posiztion in the form.
have 2 command button
i need to show listview1 when click on button1 and show listview when click on button2 hide listview1... eccc
now i use .visible false or true, but "googoling" suugest me to use Zorder, how to?
Tks.
work with 2 listview
-
- Administrator
- Posts: 78631
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: work with 2 listview
You can use
controlname.ZOrder 0
to bring a control to the front (in front of all other controls), so in your example, you could use
You have to substitute the actual names of your controls.
controlname.ZOrder 0
to bring a control to the front (in front of all other controls), so in your example, you could use
Code: Select all
Private Sub CommandButton1_Click()
Me.ListView1.ZOrder 0
End Sub
Private Sub CommandButton2_Click()
Me.ListView2.ZOrder 0
End Sub
Best wishes,
Hans
Hans
-
- NewLounger
- Posts: 6
- Joined: 04 Mar 2012, 16:40
Re: work with 2 listview
"Control name.ZOrder 0" what does it do?
-
- Administrator
- Posts: 78631
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: work with 2 listview
Welcome to Eileen's Lounge!
To place a control, let's say ListView1, in front of all other controls, use
ListView1.ZOrder 0
To place it behind all other controls, use
ListView1.Zorder 1
To place a control, let's say ListView1, in front of all other controls, use
ListView1.ZOrder 0
To place it behind all other controls, use
ListView1.Zorder 1
Best wishes,
Hans
Hans
-
- NewLounger
- Posts: 6
- Joined: 04 Mar 2012, 16:40
Re: work with 2 listview
Thank you, Mr. Hans
Oh ok! I understand
Thanks to you, I learned something new.
Oh ok! I understand
Thanks to you, I learned something new.