Trying to create custom grid true FlowLayoutPanel but there is distance imperfection. How to fix them?
Please find image attached
Source code:
Dim OPanelContent As New Wisej.Web.FlowLayoutPanel
Public Sub New()
Dim OTB As Wisej.Web.TextBox = Nothing
With OPanelContent
.Dock = Wisej.Web.DockStyle.Left
.Width = 377
.BackColor = System.Drawing.Color.DarkBlue
End With
For i = 1 To 60
OTB = New Wisej.Web.TextBox
With OTB
.BorderStyle = Wisej.Web.BorderStyle.None
.Height = 21
.Width = 77
.Margin = New Wisej.Web.Padding(0, 0, 1, 1)
End With
OPanelContent.Controls.Add(OTB)
Next
With Me
.Dock = Wisej.Web.DockStyle.Fill
.Controls.Add(OPanelContent)
End With
End Sub
There is no extra space. What you see is the result of subpixel rounding done by the browser. Check your window.devicePixelRatio. You can reproduce the same “effect” just with plain html and css: https://jsfiddle.net/je4pfoky/15/ And you can also find hundreds of posts related to this issue.
There is no solution to this problem in any environment. All you can do is use value multiples that may avoid rounding depending on the pixel ratio, which changes depending on the user’s device and the browser’s zoom value.
Please login first to submit.