ListBox类的ValueMember属性返回什么? [英] What does ValueMember property of ListBox class return?

查看:106
本文介绍了ListBox类的ValueMember属性返回什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨!

有人可以给我解释一下ListBox类的ValueMember属性是做什么的吗?

Hi!

Can somebody please explain to me what the ValueMember property of the ListBox class does?

Thanks in advance!

推荐答案

ListBox的显示字符串是您在GUI中看到的显示字符串,并且与每个显示字符串相关联都是一个值.因此,ListControl的DisplayMember为您提供了您在GUI中看到的字符串,而ListControl的ValueMember属性(ListBox派生自ListControl)为您提供了相关的值.

请参阅此网站上的示例: http://msdn.microsoft. com/en-us/library/system.windows.forms.listcontrol.valuemember.aspx [
A ListBox has display strings those are the ones you see in the GUI and associated with each of these display strings is a value. So the DisplayMember of ListControl gives you the string as you see it in your GUI and the ValueMember property of ListControl (ListBox is derived from ListControl) gives you the associated value.

Please see the example on this site: http://msdn.microsoft.com/en-us/library/system.windows.forms.listcontrol.valuemember.aspx[^]
The example is on the ListControl class site, but it contains an example using the ListBox class.

Hope that helps you!

Best regards,
Manfred


这篇关于ListBox类的ValueMember属性返回什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆