This commit is contained in:
Jonathan Jenne
2017-06-23 16:11:10 +02:00
parent 0f8f8ddf65
commit f24d8ba4cb
8 changed files with 71 additions and 33 deletions

View File

@@ -1380,9 +1380,6 @@ Public Class ClassControlBuilder
Try
Dim control As Label = New Label
Dim defaultSize As Size = New Size(200, 27)
If id = 735 Then
Dim i = "Obacht"
End If
Dim metadata As New ClassControlMetadata()
metadata.Id = id
metadata.Name = name
@@ -1468,6 +1465,7 @@ Public Class ClassControlBuilder
read_only As Boolean,
required As Boolean,
format As String,
autoSuggest As Boolean,
_new As Boolean,
Optional parent As GroupBox = Nothing,
Optional _designMode As Boolean = False)
@@ -1495,6 +1493,20 @@ Public Class ClassControlBuilder
'Console.WriteLine("setting tabindex of control " & name & " to " & tabindex)
If autoSuggest = True Then
control.AutoCompleteMode = AutoCompleteMode.Suggest
control.AutoCompleteSource = AutoCompleteSource.CustomSource
Dim suggestSource As New AutoCompleteStringCollection()
Dim dt As DataTable = ClassDatabase.Return_Datatable($"SELECT DISTINCT VALUE FROM VWPMO_VALUES WHERE CONTROL_ID = {id}")
For Each row As DataRow In dt.Rows
suggestSource.Add(row.Item("VALUE"))
Next
control.AutoCompleteCustomSource = suggestSource
End If
If multiline = True Then
control.Multiline = True
control.AcceptsReturn = True