3
Answers

Apparent splitter control bug

Administrator

Administrator

21y
1.9k
1
Has anyone noticed that when a splitter control is used to resize 2 horizontally docked controls, 1 on the left and 1 on the right, it works fine. But if a splitter control is used to resize 2 vertically docked controls, 1 docked to the top, 1 to the bottom, there is an error - resizing the docked controls makes the splitter gain in height and/or the bottom docked control move up in the form. Bad stuff. Is this a known bug?
Answers (3)
0
Administrator

Administrator

Admin 2.3k 1.3m 21y
My mistake - it appears to work IF, and only if, the top control associated with the splitter is docked using the full docked property. Before I was trying with the bottom control using the full docked property. So in summary, it works if: topControl.Docked = DockStyles.Full; bottomControl.Docked = DockStyles.Bottom; I'm gonna submit some code for this one ;)
0
Administrator

Administrator

Admin 2.3k 1.3m 21y
I got similar error in DataGrid docked in new form after reloading DataSource in DataGrid when new record count is bigger then older and resising form(!). Workaround: myDataGrid.Dock=DockStyle.Top; myForm.Show(); myDataGrid.Dock=DockStyle.Fill; May be any trick like this will be useful.
0
Administrator

Administrator

Admin 2.3k 1.3m 21y
I haven't looked at this so I don't know if it's a bug or not, but if you are pretty sure it is you might want to add it to this site which has a list of some .NET bugs. Hopefully the guys at MS will check it out.