当前位置:网站首页>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 :
cmboxBaudRate
yes ComboBox Of the control instanceName
attribute , NoText
attribute
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
Name
attribute , instead ofText
attribute
边栏推荐
- Data transmission in the network
- Polymorphic system summary
- AI should take code agriculture? Deepmind offers a programming version of "Alpha dog" alphacode that surpasses nearly half of programmers!
- About the use of URL, href, SRC attributes
- Enter the smart Park, and change begins here
- Global function Encyclopedia
- Reptile learning 3 (winter vacation learning)
- Detailed explanation of classic process synchronization problems
- Notes on writing test points in mind mapping
- OSI seven layer model & unit
猜你喜欢
(August 10, 2021) web crawler learning - Chinese University ranking directed crawler
Notes on writing test points in mind mapping
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 20
20 kinds of hardware engineers must be aware of basic components | the latest update to 8.13
QQ group collection
How to judge the advantages and disadvantages of low code products in the market?
Detailed explanation of classic process synchronization problems
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 15
Reptile learning 3 (winter vacation learning)
Realize cross tenant Vnet connection through azure virtual Wan
随机推荐
试题库管理系统–数据库设计[通俗易懂]
3W word will help you master the C language as soon as you get started - the latest update is up to 5.22
Recommend a cool geospatial data visualization tool with low code
How to disable debug messages on sockjs stomp - how to disable debug messages on sockjs Stomp
本地Mysql忘记密码的修改方法(windows)[通俗易懂]
QQ get group member operation time
2018 meisai modeling summary +latex standard meisai template sharing
Heartbeat error attempted replay attack
[Chongqing Guangdong education] National Open University spring 2019 2727 tax basis reference questions
How do std:: function and function pointer assign values to each other
Simple understanding of string
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 13
Workplace liquor bureau must pay attention to
Reptile learning 3 (winter vacation learning)
QQ one click cookie acquisition
DDS-YYDS
thread
Sys module
Force buckle 142 Circular linked list II
Automatic translation between Chinese and English