当前位置:网站首页>C#应用程序界面开发基础——窗体控制(4)——选择类控件
C#应用程序界面开发基础——窗体控制(4)——选择类控件
2022-07-03 01:03:00 【DXB2021】
选择类控件
选择类控件有下拉组合框(ComboBox)控件、复选框(CheckBox)控件、单选按钮(RadioButton)控件、数值选择(NumreicUpDown)控件和列表(ListBox)控件。
1、下拉组合框控件
下拉组合框控件被称为下拉组合框控件,是由System.Windows.Forms.ComboBox类提供的,主要作用是将一个集合数据以组合框的形式显示给用户,当用户单击时将以下拉框显示给用户供用户从中选择一项。
1、创建拉下框并添加内容
2、选中下拉组合框中可编辑部分的所有文本
2、复选框控件
复选框控件,允许用户选择和清除关联选项。与单选按钮不同的是,复选框无论是处于同一个容器中还是在不同的容器中,都是允许多选的。
判断复选框
实现CheckBox控件的多项选择
3、单选按钮控件
单选按钮控件,当与其它单选按钮成对出现时,允许用户从一组选项中选择单个选项。也就是说,当同一个容器中存在两个以上的单选按钮时,只能有一个被选中。但不在同一个容器中的几组单选按钮彼此不关联,是可以有多个被选中的。
使用RadioButton控件完成一道 选择题。
4、数值选择控件
数值选择控件又称为数值选择控件,是一个显示和输入数值的控件,控件提供了一对上下箭头,主要作用是将一个数按一定的值进行增加或减少。它主要有四个常用的属性:
(1)Increment属性表示每次单击按钮时增加或者减少的量。
(2)Maximum属性表示最大值。
(3)Minumum属性表示最小值。
(4)Value属性表示当前值。
5、列表控件
列表控件又称列表框,它显示一个项目列表供用户选择。在列表框中,用户一次可以选择一项,也可以选择多项。
1、在ListBox控件中添加和移除项
2、在列表框中选择多项
边栏推荐
- MySQL --- 数据库查询 - 条件查询
- Basic concept and implementation of overcoming hash
- JS inheritance and prototype chain
- ThinkPHP+Redis实现简单抽奖
- Niu Ke swipes questions and clocks in
- Usage of using clause in kingbases alter table
- Key wizard play strange learning - front desk and Intranet send background verification code
- Arduino dy-sv17f automatic voice broadcast
- The latest analysis of tool fitter (technician) in 2022 and the test questions and analysis of tool fitter (technician)
- Androd Gradle 对其使用模块依赖的替换
猜你喜欢
异步、郵件、定時三大任務
机器学习术语
Machine learning terminology
leetcode:871. 最低加油次数【以前pat做过 + 最大堆 +贪心】
[fh-gfsk] fh-gfsk signal analysis and blind demodulation research
JDBC courses
看完这篇 教你玩转渗透测试靶机Vulnhub——DriftingBlues-9
强化学习 Q-learning 实例详解
Assets, vulnerabilities, threats and events of the four elements of safe operation
leetcode:701. Insertion in binary search tree [BST insertion]
随机推荐
Kivy教程大全之 创建您的第一个kivy程序 hello word(教程含源码)
leetcode:871. 最低加油次数【以前pat做过 + 最大堆 +贪心】
机器学习术语
如今少年已归来,人间烟火气最抚凡人心 复工了~
MySQL basics 03 introduction to MySQL types
一比特苦逼程序員的找工作經曆
[fh-gfsk] fh-gfsk signal analysis and blind demodulation research
2022 Jiangxi Provincial Safety Officer B certificate reexamination examination and Jiangxi Provincial Safety Officer B certificate simulation examination question bank
Linear programming of mathematical modeling (including Matlab code)
Type expansion of non ts/js file modules
kivy教程之在 Kivy App 中使用 matplotlib 的示例
JDBC courses
Database SQL language 01 where condition
excel表格计算时间日期的差值,并转化为分钟数
MySQL
[Arduino experiment 17 L298N motor drive module]
R language ggplot2 visualization: use ggplot2 to display dataframe data that are all classified variables in the form of thermal diagram, and customize the legend color legend of factor
[my advanced journey of OpenGL learning] collation of Euler angle, rotation order, rotation matrix, quaternion and other knowledge
测试右移:线上质量监控 ELK 实战
Matlab Doppler effect produces vibration signal and processing