P
Pipo
Hi,
During run-time I change the layout of my wondows forms.
The problem is you can see the changing when it happens.
I change some grids in a groupbox (grbRates).
So I do the SuspendLayout() and ResumeLayout when it is done.
That is not working, I read the MSDN and it says this should work.
What am I doing wrong? I use VS 2005, C# 2.0
tia.
Code snippet in an SelectedIndexChange event:
grbRates.SuspendLayout();
if (grbInquiry.Visible)
{
//Set screen.
dgvRatesSelling.Dock = DockStyle.None;
dgvRatesSelling.Width = dgvRatesBuying.Width;
dgvRatesSelling.Anchor = dgvRatesBuying.Anchor;
dgvRatesBuying.Visible = true;
}
else
{
//Default screen.
dgvRatesSelling.Dock = DockStyle.Fill;
dgvRatesBuying.Visible = false;
}
grbRates.ResumeLayout();
During run-time I change the layout of my wondows forms.
The problem is you can see the changing when it happens.
I change some grids in a groupbox (grbRates).
So I do the SuspendLayout() and ResumeLayout when it is done.
That is not working, I read the MSDN and it says this should work.
What am I doing wrong? I use VS 2005, C# 2.0
tia.
Code snippet in an SelectedIndexChange event:
grbRates.SuspendLayout();
if (grbInquiry.Visible)
{
//Set screen.
dgvRatesSelling.Dock = DockStyle.None;
dgvRatesSelling.Width = dgvRatesBuying.Width;
dgvRatesSelling.Anchor = dgvRatesBuying.Anchor;
dgvRatesBuying.Visible = true;
}
else
{
//Default screen.
dgvRatesSelling.Dock = DockStyle.Fill;
dgvRatesBuying.Visible = false;
}
grbRates.ResumeLayout();