I am developing an application using panels. Depending on user selection I
make panels visible or not.
I currently have only two panels. For some reason when the user selects the
2nd menu item - which makes the appropriate panel visible, I only get a
blank screen where the panel should be. If I select the 1st menu item, it
does display thte appropriate panel. I even used .bringtofront but still did
not work...
Here is the code. It's very straight forward... In the treeview item "after
select" method, depending on index item of treeview, the approprite panel is
selected...
Private Sub trvMenu_AfterSelect(ByVal sender As System.Object, ByVal e As
System.Windows.Forms.TreeViewEventArgs) Handles trvMenu.AfterSelect
' Display the appropriate panel
' make all panels invisible first
Call ClearPanels()
Select Case trvMenu.SelectedNode.Index
Case 0
' Customer
Me.pnlCust.Visible = True
pnlCust.BringToFront()
Case 1
' Note: This one does not work for some reason
Me.pnlLogWalls.Visible = True
pnlLogWalls.BringToFront()
End Select
End Sub
Does anayone have anay suggestions??
Thanks, Brad
Jeff Gaines - 21 Dec 2006 23:31 GMT
On 21/12/2006 in message <uHYYfWUJHHA.1252@TK2MSFTNGP02.phx.gbl> Brad
Pears wrote:
>Does anayone have anay suggestions??
I've always been a bit wary of just using BringToFront. I usually do:
To Hide:
Undock
Size to 1x1x1x1
Hide
To Show:
Dock/resize
Bring to Front
Make Visible
May be worth a try?

Signature
Jeff Gaines
Damerham Hampshire UK