This commit is contained in:
2024-10-01 16:32:40 +02:00
parent 76fbf96823
commit fad2055152
2987 changed files with 13801 additions and 200 deletions

View File

@@ -1,39 +0,0 @@
Imports System.ComponentModel
Public Class MyListBox
Inherits System.Windows.Forms.ListBox
Public Sub New()
End Sub
Sub fillWithMyListItem(l As List(Of MyListItem))
MyBase.Items.Clear()
For Each i In l : MyBase.Items.Add(i) : Next
End Sub
Sub fillWithSQL(sql As String, Optional showValueInText As Boolean = True, Optional conn As String = "SDL")
fillWithMyListItem((New SQL).loadCboBySqlWithListItem(sql, showValueInText, conn))
End Sub
Public Property _value As String
Get
Return getValueOfItem()
End Get
Set(v As String)
changeItem(v)
End Set
End Property
Sub changeItem(v)
For Each i In MyBase.Items
If DirectCast(i, MyListItem).Value = v Then
MyBase.SelectedItem = i : Exit Sub
End If
Next
End Sub
Function getValueOfItem() As String
Try : Return DirectCast(MyBase.SelectedItem, MyListItem).Value : Catch : End Try
Return ""
End Function
End Class