This commit is contained in:
2021-03-04 15:47:48 +01:00
parent 3aaf328ce6
commit b4612ab3e0
142 changed files with 24372 additions and 14785 deletions

View File

@@ -15,7 +15,9 @@ Public Class MyComboBox
If firstEmpty Then
Me.Items.Insert(0, New MyListItem("", ""))
End If
For Each i In l : MyBase.Items.Add(i) : Next
If l IsNot Nothing Then
For Each i In l : MyBase.Items.Add(i) : Next
End If
End Sub
Sub fillWithSQL(sqlstr As String, Optional showValueInText As Boolean = True, Optional conn As String = "SDL", Optional firstEmpty As Boolean = False, Optional clearList As Boolean = True)
fillWithMyListItem((New SQL).loadCboBySqlWithListItem(sqlstr, showValueInText, conn), firstEmpty, clearList)
@@ -92,6 +94,7 @@ Public Class MyComboBox
End Function
Function getValueOfItem() As String
If Me.Items.Count = 0 Then Return ""
Try : Return DirectCast(MyBase.SelectedItem, MyListItem).Value
Catch
Try : Return MyBase.SelectedItem.ToString : Catch : End Try
@@ -100,7 +103,7 @@ Public Class MyComboBox
Return ""
End Function
Private Sub MyComboBox_Leave(sender As Object, e As EventArgs) Handles Me.Leave
If Me.DropDownStyle = Windows.Forms.ComboBoxStyle.DropDown Then
If Me.Text = "" Then