I had a special problem with the order of adding FlowLayoutPanels to the control property . This is what I tried
I added 7 FlowLayoutPanels to the C # window app from left to right in vertical stripes. Then I marked the thread layouts as 1, 2, 3, ... 7 again from left to right. Now, in the form load handler, I wrote the following snippet,
foreach (FlowLayoutPanel aDaysControl in this.Controls)
{
MessageBox.Show(aDaysControl.Tag.ToString());
}
Messages were expected to appear in the order 1, 2, ... 7 . But I received it in reverse order (7, 6, ... 1). Can someone help me with the mistake I made?
The reason for maintaining order,
I am trying to do calendar management with each row representing the day. If the month starts on Wednesday, then I need to add an empty label in the first (Monday) and second (Tuesday) row. So order matters
Sudarsan srinivasan
source
share