Docking Dilemma
-
Hi guys, I've two panels on my WinForm, one is docked to the left of the container and the other at the bottom. Assume that there are no more controls on the form. Now sometimes these panels are docked to the container (i.e. a WinForm) as
+-----------+
| |
| panelLeft +----------------------+
| | panelBottom |
+-----------+----------------------+and sometimes as
+-----------+
| |
| panelLeft |
| |
+-----------+----------------------+
| panelBottom |
+----------------------------------+I want to know why? Isn't there any way of making it sure as how these Panels will be docked in RELEASE version. Plz do reply, Gurmeet
BTW, can Google help me search my lost pajamas?
My Articles: HTML Reader C++ Class Library, Numeric Edit Control
-
Hi guys, I've two panels on my WinForm, one is docked to the left of the container and the other at the bottom. Assume that there are no more controls on the form. Now sometimes these panels are docked to the container (i.e. a WinForm) as
+-----------+
| |
| panelLeft +----------------------+
| | panelBottom |
+-----------+----------------------+and sometimes as
+-----------+
| |
| panelLeft |
| |
+-----------+----------------------+
| panelBottom |
+----------------------------------+I want to know why? Isn't there any way of making it sure as how these Panels will be docked in RELEASE version. Plz do reply, Gurmeet
BTW, can Google help me search my lost pajamas?
My Articles: HTML Reader C++ Class Library, Numeric Edit Control
-
I think you have to go to your
InitializeComponent()
and at the end of it see which one added toControl
propoerty of your form. Mazy
"One who dives deep gets the pearls,the burning desire for realization brings the goal nearer." - BabujiBoth of those panel controls are being added to the
Controls
property of the form inInitializeComponent()
. Whatz the point by the way? Gurmeet
BTW, can Google help me search my lost pajamas?
My Articles: HTML Reader C++ Class Library, Numeric Edit Control
-
Both of those panel controls are being added to the
Controls
property of the form inInitializeComponent()
. Whatz the point by the way? Gurmeet
BTW, can Google help me search my lost pajamas?
My Articles: HTML Reader C++ Class Library, Numeric Edit Control
Gurmeet S. Kochar wrote: Both of those panel controls are being added to the Controls property of the form in InitializeComponent(). Whatz the point by the way? I know both added. I mean which one first added and which one is second. This will show which one is at the top of other one. Mazy
"One who dives deep gets the pearls,the burning desire for realization brings the goal nearer." - Babuji -
Both of those panel controls are being added to the
Controls
property of the form inInitializeComponent()
. Whatz the point by the way? Gurmeet
BTW, can Google help me search my lost pajamas?
My Articles: HTML Reader C++ Class Library, Numeric Edit Control
Adding to what Mazdak said, if you see
Controls.AddRange
the controls are actually added in reverse order from what you see listed, like:Controls.AddRange(new Control[]
{
myControl3,
myControl2,
myControl1
});Microsoft MVP, Visual C# My Articles
-
Adding to what Mazdak said, if you see
Controls.AddRange
the controls are actually added in reverse order from what you see listed, like:Controls.AddRange(new Control[]
{
myControl3,
myControl2,
myControl1
});Microsoft MVP, Visual C# My Articles
Heath Stewart wrote: the controls are actually added in reverse order So what you are saying is that
myControl1
will get added first, thenmyControl2
and thenmyControl3
? How this all reverse order adding affects docking? Gurmeet
BTW, can Google help me search my lost pajamas?
My Articles: HTML Reader C++ Class Library, Numeric Edit Control
-
Heath Stewart wrote: the controls are actually added in reverse order So what you are saying is that
myControl1
will get added first, thenmyControl2
and thenmyControl3
? How this all reverse order adding affects docking? Gurmeet
BTW, can Google help me search my lost pajamas?
My Articles: HTML Reader C++ Class Library, Numeric Edit Control
Yes. The docked controls are docked in relation to each other in the order in which they were added.
Microsoft MVP, Visual C# My Articles