Click here to Skip to main content
15,891,431 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have a winform study that have 2 panel (Panel1 and Panel2) When I click devexpress link1_button, I can see Panel1 and panel2 hide, but when I click link1_button I cannot see panel2, only see blank screen.

I want;

link1_button Click ==> see Panel1 hide Panel2

link2_button Click ==> see Panel2 hide Panel1

see my codes below


    Private Sub inboxItem_LinkClicked(sender As Object, e As DevExpress.XtraNavBar.NavBarLinkEventArgs) Handles inboxItem.LinkClicked
        Panel1.Show()
        Panel2.Hide()
    End Sub

    Private Sub outboxItem_LinkClicked(sender As Object, e As DevExpress.XtraNavBar.NavBarLinkEventArgs) Handles outboxItem.LinkClicked
        Panel1.Hide()
        Panel2.Show()
    End Sub

    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        Panel1.Hide()
        Panel2.Hide()
    End Sub
End Class


What I have tried:

Private Sub outboxItem_LinkClicked(sender As Object, e As DevExpress.XtraNavBar.NavBarLinkEventArgs) Handles outboxItem.LinkClicked
        Panel1.Hide()
        Panel2.Show()
    End Sub

    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        Panel1.Hide()
        Panel2.Hide()
    End Sub
Posted
Updated 23-Mar-17 16:01pm

1 solution

give this a shot

Private Sub inboxItem_LinkClicked(sender As Object, e As DevExpress.XtraNavBar.NavBarLinkEventArgs) Handles inboxItem.LinkClicked
        Panel1.visible = true
        Panel2.visible = false
    End Sub

Private Sub outboxItem_LinkClicked(sender As Object, e As DevExpress.XtraNavBar.NavBarLinkEventArgs) Handles outboxItem.LinkClicked
        Panel1.visible = false
        Panel2.visible = true
    End Sub

    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        Panel1.visible = false
        Panel2.visible = false
    End Sub


another thing to check is that panel2 is not inside of panel1.
 
Share this answer
 
v2
Comments
Member 12860952 26-Mar-17 2:13am    
how can I check this? -thanks@clwprogrammer
Member 12860952 26-Mar-17 7:10am    
I solve this-thanks for your answer. problem is my panel2 in Panel1 !

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900