Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm Controls / December 2006

Tip: Looking for answers? Try searching our database.

making panels visible/not visible issue...

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Brad Pears - 21 Dec 2006 21:21 GMT
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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.