我的程序中有以下功能。带有 的线**
是出错的地方。Textbox.Text 的值返回旧值而不是新值。文本框的.Text
属性设置为不同的功能。然后用户可以更改它们并运行此功能。但是该Textbox.Text
字段仍然具有旧值并且没有更新。有谁知道我该如何解决这个问题?
谢谢。
Private Function saveListFromEditor()
Dim newpartialfunctionlist As New List(Of Te)
For Each Tab As TabPage In TabControl1.TabPages
For Each TObj In Tab.Controls
If TObj.GetType.ToString.ToLower = "system.windows.forms.flowlayoutpanel" Then
Dim flowlayout As FlowLayoutPanel = CType(TObj, FlowLayoutPanel)
Dim values As NameValueCollection = New NameValueCollection
For Each obj In flowlayout.Controls
If (obj.GetType.ToString.ToLower = "system.windows.forms.textbox") Then
Dim textbox As TextBox = CType(obj, TextBox)
If (textbox.Name.ToString.ToLower = "display") Then
newfunction.display = textbox.Text
Else
**values.Add(textbox.Name, textbox.Text)**
End If
End If
Next
End If
Next
Next
Return values
End Function