-
March 14th, 2006, 09:35 AM
#1
Control visible does not work
I have a very strange problem. Any help will be appriciated.
I have a form with few controls. The controls are invisible, and when the user performs some operations the controls ahould become visible.
Code:
control.Visible = true;
I put a breakpoint in this line, but the control's Visible property stays "false" and the control does not become visible.
Any idea what can cause this phenomenon?
-
March 14th, 2006, 11:30 AM
#2
Re: Control visible does not work
-
March 14th, 2006, 01:03 PM
#3
Re: Control visible does not work
It is contained in a visible usercontrol. The form itself is contained in an MFC form (by setting the parent of the form to be the MFC form).
This looks like a bug in windows, because even if the control is visible, the .NET framework seems to think it is not visible:
Code:
control.Visible = true;
if (!control.Visible)
MessageBox.Show("Not visible");
And even if the control is visible the messagebox is shown.
Have no idea what this means.
-
March 15th, 2006, 08:26 AM
#4
Re: Control visible does not work
may be they are located inside another control, and the property of that control is set to invisible?
If you think you CAN, you can, If you think you CAN'T, you are probably right.
Have some nice Idea to share? Write an Article Online or Email to us and You may WIN a Technical Book from CG.
-
March 15th, 2006, 10:19 AM
#5
Re: Control visible does not work
This is not the case for me.
I kind of solved the problem by placing the Visible = false inside the Load event, instead of setting it in the designer.
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
|