|
-
Jan 23rd, 2003, 10:25 PM
#1
Thread Starter
Lively Member
Show hide panels
Hi All
i am trying to have a program with 5 panels
all of the will load the same size and location
when the new one loads i whant it should check if there
is a 2 panel open if yes it should show it when these one
closes.
now when a panel opens the panel1.enable=true
and panel1.visable=true
if a second panel loads it will check for panels if it will find
a panel it should panel1.visable=false
becuse the tab order should be only on the 2 panel.
if any one has a idea please reply
Thank You
-
Jan 24th, 2003, 04:00 AM
#2
Registered User
For 2 panels this works, just a little more code for every panel....
Code:
Dim c As Control
For Each c In Me.Controls
If c Is Panel1 Then
c.Visible = False
Panel2.Visible = True
End If
Next
-
Jan 24th, 2003, 04:23 AM
#3
Hyperactive Member
This is how I got round that problem in VB6 with Group Control (I think that's wha it was called). Created a function called CloseAllPanels and have this code for however many panels:
VB Code:
Panel1.Visable = False
Panel2.Visable = False
Panel3.Visable = False
..
..
Then, whenever you want to show a certain panel, say panel 3 on the click of a button, you'd have something like:
VB Code:
Private Sub btnShowPanel3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClose.Click
CloseAllPanels
Panel3.Visable=True
End Sub
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
|