当前位置:网站首页>Method of setting default items in C # ComboBox control code
Method of setting default items in C # ComboBox control code
2022-07-04 11:50:00 【Zhangshizheng】
describe
- C# It can be developed quickly Windows Form application , Drag controls visually , Plus code matching , It can realize the development of powerful applications , Such as host computer development
- Here I develop a host computer based on serial port , Used ComboBox, How to initialize , Select the specified member item ?
Set before

After setting
cmboxBaudRate.SelectedIndex = 12;
/cmboxDataBit.SelectedIndex = 3;
cmboxStopBit.SelectedIndex = 0;
cmboxParity.SelectedIndex = 0;
cmboxFlowControl.SelectedIndex = 0;
- It's mainly used here ComboBox Properties of :
SelectedIndex, Index from 0 Start , If you choose the second item , Use :
cmboxBaudRate.SelectedIndex = 1; /* The second item */
- Notice the :
cmboxBaudRateyes ComboBox Of the control instanceNameattribute , NoTextattribute


Summary
- ComboBox It is often used in the application of some drop-down options , It is widely used , Using skills requires continuous accumulation
- Code operation C# Control for , Need to use controls
Nameattribute , instead ofTextattribute
边栏推荐
- Attributes and methods in math library
- Climb Phoenix Mountain on December 19, 2021
- C language memory layout
- OSI seven layer model & unit
- [Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 20
- Reptile learning 4 winter vacation series (3)
- re. Sub() usage
- [Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 18
- QQ group administrators
- Review of week 278 of leetcode II
猜你喜欢
![[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 12](/img/b1/926d9b3d7ce9c5104f3e81974eef07.jpg)
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 12
![[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 6](/img/38/51797fcdb57159b48d0e0a72eeb580.jpg)
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 6

Post man JSON script version conversion

Realize cross tenant Vnet connection through azure virtual Wan
![[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 8](/img/16/33f5623625ba817e6e022b5cb7ff5d.jpg)
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 8
![[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 23](/img/72/a80ee7ee7b967b0afa6018070d03c9.jpg)
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 23
![[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 11](/img/6a/398d9cceecdd9d7c9c4613d8b5ca27.jpg)
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 11

Take advantage of the world's sleeping gap to improve and surpass yourself -- get up early

DDS-YYDS

Serialization oriented - pickle library, JSON Library
随机推荐
Review of week 278 of leetcode II
How to judge the advantages and disadvantages of low code products in the market?
Cacti主机模板之定制版
Solaris 10 network services
Reptile learning 4 winter vacation series (3)
Swagger and OpenAPI
array_ The contains() function uses
JD home programmers delete databases and run away. Talk about binlog, the killer of MySQL data backup
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 23
[Chongqing Guangdong education] National Open University spring 2019 2727 tax basis reference questions
QQ group administrators
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 12
re. Sub() usage
Force buckle 142 Circular linked list II
Iptables cause heartbeat brain fissure
Detailed array expansion analysis --- take you step by step analysis
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 6
Data transmission in the network
2021-08-09
Understanding of object