Reputation: 942
I have an application containing tab pages , on one of the tab page I have placed data grid view control. Now I would like to modify grid view location on the resize event of the tab page.Here is how my code looks like..
System.Drawing.Point pTabCntrlLocn= tabCntrl.Location;
System.Drawing.Point pDatGrdLocn = DataGrid.Location
int iCntrlYLocn = pDatGrdLocn .Y + 50;
DataGrid.Location = new System.Drawing.Point(pDatGrdLocn .Location.X, iCntrlYLocn);
I not getting exception in last code line ,but also I cannot see control at new location nor the control location value modifies.
Please help me to track the missing link.
Upvotes: 0
Views: 106
Reputation: 116528
If Dock is set, changing the location will do nothing.
To change the size (in your case, the height), modify the Height
property instead.
Upvotes: 2