This is probably the coolest most annoying bug I have ever come across.
I have a flow layout panel with a listview inside of it.
The ListView has a size of 500 The FlowLayoutPanel has a size of 800
When the user clicks a button a new control is created with a size of 400
the size of the FlowLayoutPanel Increases to 900
The Size of the ListView decreasesto the flowlayoutpanel size(900) - new control(400) minus 20(margin)
The Control is added into the FlowLayoutPanel
The problem is when a user has the Windows Settings Of Font size set to Medium Instead of amsller, the math messes up and sticks the note control behind the listview.
Has anyone else came across this problem?
Dim noteControl As New AddNote(CurrentEventID, "Followup", False, ConnectionID)
noteControl.Size = New Size(500, flpMain.Height - 2)
noteControl.cmbNoteType.Visible = False
noteControl.Anchor = AnchorStyles.Right
ListView1.Size = New Size(flpMain.Size.Width - noteControl.Size.Width - 45, ListView1.Size.Height)
flpMain.Controls.Add(noteControl)
flpMain.Width = Me.Width - 10
For Each mycontrol As Control In flpMain.Controls
If mycontrol.Name.ToString = "AddNote" Then
y = CType(mycontrol, AddNote)
mycontrol = y
ListView1.Width = flpMain.Width - y.Width - 45
End If
Next
If flpMain.Controls.Count = 1 Then
ListView1.Width = flpMain.Width - 10
End If
Dim columns As Integer = ListView1.Columns.Count
ListView1.Columns(columns - 1).Width = ListView1.Width
For index = 0 To columns - 2
ListView1.Columns(columns - 1).Width = ListView1.Columns(columns - 1).Width - ListView1.Columns(index).Width
Next