in the attachments all the explanation
the error occurs when i call the custom control :
Dim c As New ctrStatistic
c.d1 = dtp1.Value.ToShortDateString
c.d2 = dtp2.Value.ToShortDateString
c.Dock = DockStyle.Fill
c.Height = SplitContainer1.Panel2.Height
no width properties are setted by code and by design-time.
actual version 2.0.28
please answer me as soon as possible
Something in the scaling is calculating a large factor for the columns. The scaling is done when the font changes. Can you please try this:
1 – Set AutoScaleMode of the UserControl to None
2- Override “protected override void ScaleControl(SizeF factor, BoundsSpecified specified)” in your DataGridView class put a breakpoint and call base to see what the factor is.
You can also override the “bool ScaleChildren” property in your derived DataGridView class and return false to prevent the DGV from scaling the column width as a workaround.
Let me know. We can try to build a test case as well, but it will probably not show the same issue.
Please login first to submit.