Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 2005 > C# 2005
|
C# 2005 For discussion of Visual C# 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 21st, 2006, 06:34 PM
Registered User
 
Join Date: Feb 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Set Panel Visibility Problem

Hello there,

I have created a very simple application using C# 2005 Windows Forms.

It contains only one panel.

Code:
this.mainPanel.Location = new System.Drawing.Point(12, 12);
this.mainPanel.Name = "mainPanel";
this.mainPanel.Size = new System.Drawing.Size(177, 197);
this.mainPanel.Visible = true;
If I check the panel visibility at this point, it contains true. Great! Nevertheless, after I add this panel to the main form, the visibiliy gets set back to false.

Code:
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(201, 220);
this.Controls.Add(this.mainPanel);
If I now check this.mainPanel.Visible its equal to false.

In addition, I try to set this panel to true in other parts of the code and I can't. I do "this.mainPanel.Visible = true" and it does not work.

Any ideas?

Thanks in advance for your help.

Best,
Fred





Similar Threads
Thread Thread Starter Forum Replies Last Post
problem in calendar visibility premnaath ASP.NET 2.0 Professional 1 November 16th, 2007 09:25 AM
Chart Visibility baaul Reporting Services 1 September 28th, 2006 03:53 PM
ViewState problem when adding a panel to a panel koekie17 C# 3 February 20th, 2006 09:17 AM
Visibility Issue braheem ASP.NET 1.0 and 1.1 Basics 1 July 14th, 2005 05:20 PM
Procedure visibility rgerald Access VBA 6 December 10th, 2003 05:03 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.