jj 14.12
This commit is contained in:
@@ -772,6 +772,8 @@ Public Class ClassControlBuilder
|
|||||||
control.Parent = _master_panel
|
control.Parent = _master_panel
|
||||||
control.DropDownStyle = ComboBoxStyle.DropDown
|
control.DropDownStyle = ComboBoxStyle.DropDown
|
||||||
control.FormattingEnabled = True
|
control.FormattingEnabled = True
|
||||||
|
control.AutoCompleteMode = AutoCompleteMode.Append
|
||||||
|
control.AutoCompleteSource = AutoCompleteSource.ListItems
|
||||||
|
|
||||||
If (Not _designMode And read_only) Then
|
If (Not _designMode And read_only) Then
|
||||||
control.Enabled = Not read_only
|
control.Enabled = Not read_only
|
||||||
|
|||||||
@@ -152,8 +152,8 @@ Public Class ClassControlValues
|
|||||||
LoadControlValue_forControl(RecordID, FormID, DirectCast(control, ComboBox), CONTROL_ID)
|
LoadControlValue_forControl(RecordID, FormID, DirectCast(control, ComboBox), CONTROL_ID)
|
||||||
'LoadControlValues(RecordID, FormID, DirectCast(control, ComboBox).Controls)
|
'LoadControlValues(RecordID, FormID, DirectCast(control, ComboBox).Controls)
|
||||||
ElseIf TypeOf control Is GroupBox Then
|
ElseIf TypeOf control Is GroupBox Then
|
||||||
LoadControlValue_forControl(RecordID, FormID, DirectCast(control, GroupBox), CONTROL_ID)
|
'LoadControlValue_forControl(RecordID, FormID, DirectCast(control, GroupBox), CONTROL_ID)
|
||||||
' LoadControlValues(RecordID, FormID, DirectCast(control, GroupBox).Controls)
|
LoadControlValues(RecordID, FormID, DirectCast(control, GroupBox).Controls)
|
||||||
ElseIf TypeOf control Is PictureBox Then
|
ElseIf TypeOf control Is PictureBox Then
|
||||||
LoadImage(RecordID, CONTROL_ID, control)
|
LoadImage(RecordID, CONTROL_ID, control)
|
||||||
Else
|
Else
|
||||||
@@ -393,10 +393,10 @@ Public Class ClassControlValues
|
|||||||
End Try
|
End Try
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Shared Sub LoadControlValuesList(RecordID As Integer, FormID As Integer, controls As Control.ControlCollection)
|
Public Shared Sub LoadControlValuesList(RecordID As Integer, FormID As Integer, controls As Control.ControlCollection)
|
||||||
Try
|
Try
|
||||||
For Each Ctrl As Control In controls
|
For Each Ctrl As Control In controls
|
||||||
|
|
||||||
If TypeOf Ctrl Is ComboBox Then
|
If TypeOf Ctrl Is ComboBox Then
|
||||||
Dim Combobox = DirectCast(Ctrl, ComboBox)
|
Dim Combobox = DirectCast(Ctrl, ComboBox)
|
||||||
|
|
||||||
@@ -418,9 +418,10 @@ Public Class ClassControlValues
|
|||||||
Combobox.DataSource = DT_Combobox
|
Combobox.DataSource = DT_Combobox
|
||||||
Combobox.DisplayMember = DT_Combobox.Columns(1).ColumnName
|
Combobox.DisplayMember = DT_Combobox.Columns(1).ColumnName
|
||||||
Combobox.ValueMember = DT_Combobox.Columns(0).ColumnName
|
Combobox.ValueMember = DT_Combobox.Columns(0).ColumnName
|
||||||
Combobox.AutoCompleteMode = AutoCompleteMode.Append
|
'Combobox.AutoCompleteMode = AutoCompleteMode.Append
|
||||||
Combobox.AutoCompleteSource = AutoCompleteSource.ListItems
|
'Combobox.AutoCompleteSource = AutoCompleteSource.ListItems
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim iWidestWidth As Integer = 300
|
Dim iWidestWidth As Integer = 300
|
||||||
For Each row As DataRow In DT_Combobox.Rows
|
For Each row As DataRow In DT_Combobox.Rows
|
||||||
'Die BReite der DropDown-Lsit anpassen
|
'Die BReite der DropDown-Lsit anpassen
|
||||||
@@ -432,15 +433,17 @@ Public Class ClassControlValues
|
|||||||
End Using
|
End Using
|
||||||
' control.Items.Add(row.Item(0).ToString)
|
' control.Items.Add(row.Item(0).ToString)
|
||||||
Next
|
Next
|
||||||
|
|
||||||
If iWidestWidth > 300 Then
|
If iWidestWidth > 300 Then
|
||||||
Combobox.DropDownWidth = Math.Max(iWidestWidth, Combobox.Width)
|
Combobox.DropDownWidth = Math.Max(iWidestWidth, Combobox.Width)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
LoadControlValue(RecordID, GetControlID_for_Name(Combobox.Name, FormID), Ctrl)
|
LoadControlValue(RecordID, GetControlID_for_Name(Combobox.Name, FormID), Ctrl)
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
Next
|
Next
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
MsgBox("Unexpected Error in LoadControlValuesList:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
MsgBox("Unexpected Error in LoadControlValuesList:" & vbNewLine & ex.Message, MsgBoxStyle.Critical)
|
||||||
|
|||||||
@@ -1022,6 +1022,7 @@ Public Class frmForm_Constructor_Main_2
|
|||||||
NEW_RECORD_ID = 0
|
NEW_RECORD_ID = 0
|
||||||
If Not RECORD_CHANGED Then
|
If Not RECORD_CHANGED Then
|
||||||
Update_Status_Label(True, "KEINE Änderungen an Datensatz.")
|
Update_Status_Label(True, "KEINE Änderungen an Datensatz.")
|
||||||
|
Me.Cursor = Cursors.Default
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|||||||
Reference in New Issue
Block a user