G
Guest
Hi
I have a problem in one of my user controls that I cannot find any solution
for.
I'am running C# for Visual studio 2003 and developing a windows application.
The problem is the following:
I have a user control with several panels inside it. Each panel is docked at
top, which means that if one panel is hidden, the panels underneath it will
move up to cover the newly hidden area (basic information, I know, but just
to clarify . Forms in my application that are using this control should
adjust their heights, so that the user control fits into them, without any
blank area.
In this user control I have some properties that can be set to true/false,
which in turns shows or hides the panels.
Now to the strange thing: When hiding some of the panels, I want to change
the size of the user control not to have any blank area in it. This is done
by looping through all of the panels in the control and checking the visible
property. The panel with the location at the bottom that has its visible
property set to true decides the height of the control.
The problem is that all panels report their visible property set to false
when looping through them - always. Even if they report their visible
property to false, the panels that should be visible (according to the
properties I have) are visible, so the control behaves correctly in this
case. The problem is that the reported height of the control is not ok.
The application is only running in one thread.
Have anyone a solution to this?
/Fredrik
I have a problem in one of my user controls that I cannot find any solution
for.
I'am running C# for Visual studio 2003 and developing a windows application.
The problem is the following:
I have a user control with several panels inside it. Each panel is docked at
top, which means that if one panel is hidden, the panels underneath it will
move up to cover the newly hidden area (basic information, I know, but just
to clarify . Forms in my application that are using this control should
adjust their heights, so that the user control fits into them, without any
blank area.
In this user control I have some properties that can be set to true/false,
which in turns shows or hides the panels.
Now to the strange thing: When hiding some of the panels, I want to change
the size of the user control not to have any blank area in it. This is done
by looping through all of the panels in the control and checking the visible
property. The panel with the location at the bottom that has its visible
property set to true decides the height of the control.
The problem is that all panels report their visible property set to false
when looping through them - always. Even if they report their visible
property to false, the panels that should be visible (according to the
properties I have) are visible, so the control behaves correctly in this
case. The problem is that the reported height of the control is not ok.
The application is only running in one thread.
Have anyone a solution to this?
/Fredrik