本文整理汇总了VB.NET中System.Windows.Forms.DomainUpDown.OnSelectedItemChanged方法的典型用法代码示例。如果您正苦于以下问题:VB.NET DomainUpDown.OnSelectedItemChanged方法的具体用法?VB.NET DomainUpDown.OnSelectedItemChanged怎么用?VB.NET DomainUpDown.OnSelectedItemChanged使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.Forms.DomainUpDown 的用法示例。
在下文中一共展示了DomainUpDown.OnSelectedItemChanged方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的VB.NET代码示例。
示例1: MySub
Protected domainUpDown1 As DomainUpDown
Private Sub MySub()
' Create and initialize the DomainUpDown control.
domainUpDown1 = New System.Windows.Forms.DomainUpDown()
' Add the DomainUpDown control to the form.
Controls.Add(domainUpDown1)
End Sub
Private Sub button1_Click(sender As System.Object, e As System.EventArgs)
' Add the text box contents and initial location in the collection
' to the DomainUpDown control.
domainUpDown1.Items.Add((textBox1.Text.Trim() & " - " & myCounter))
' Increment the counter variable.
myCounter = myCounter + 1
' Clear the TextBox.
textBox1.Text = ""
End Sub
Private Sub checkBox1_Click(sender As System.Object, e As System.EventArgs)
' If Sorted is set to true, set it to false;
' otherwise set it to true.
If domainUpDown1.Sorted Then
domainUpDown1.Sorted = False
Else
domainUpDown1.Sorted = True
End If
End Sub
Private Sub domainUpDown1_SelectedItemChanged _
(sender As System.Object, e As System.EventArgs)
' Display the SelectedIndex and SelectedItem property values in a MessageBox.
MessageBox.Show(("SelectedIndex: " & domainUpDown1.SelectedIndex.ToString() & _
ControlChars.Cr & "SelectedItem: " & domainUpDown1.SelectedItem.ToString()))
End Sub
开发者ID:VB.NET开发者,项目名称:System.Windows.Forms,代码行数:43,代码来源:DomainUpDown.OnSelectedItemChanged
注:本文中的System.Windows.Forms.DomainUpDown.OnSelectedItemChanged方法示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论