neu
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user