当前位置:网站首页>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
边栏推荐
- iptables导致Heartbeat脑裂
- World document to picture
- Iptables cause heartbeat brain fissure
- 2021 annual summary - it seems that I have done everything except studying hard
- [Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 6
- [Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 7
- Detailed array expansion analysis --- take you step by step analysis
- re. Sub() usage
- Btrace tells you how to debug online without restarting the JVM
- Notes on writing test points in mind mapping
猜你喜欢

OSI seven layer model & unit

Digital simulation beauty match preparation -matlab basic operation No. 6

Here, the DDS tutorial you want | first experience of fastdds - source code compilation & Installation & Testing

Login operation (for user name and password)

os. Path built-in module
![[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 12](/img/b1/926d9b3d7ce9c5104f3e81974eef07.jpg)
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 12

Climb Phoenix Mountain on December 19, 2021

netstat

Detailed array expansion analysis --- take you step by step analysis

DVC use case (VI): Data Registry
随机推荐
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 12
os. Path built-in module
TCP fast retransmission sack mechanism
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 21
2018 meisai modeling summary +latex standard meisai template sharing
(August 10, 2021) web crawler learning - Chinese University ranking directed crawler
[Yunju entrepreneurial foundation notes] Chapter II entrepreneur test 24
array_ The contains() function uses
8.8.1-PointersOnC-20220214
Login operation (for user name and password)
Swagger and OpenAPI
Common tips
Common built-in modules
Notes on writing test points in mind mapping
Dos and path
Daemon xinted and logging syslogd
Introduction to Lichuang EDA
Local MySQL forgot the password modification method (Windows)
VPS installation virtualmin panel
How to judge the advantages and disadvantages of low code products in the market?